Marketplace móvil para negocios locales mexicanos. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React Web) - apps/mobile (Expo/React Native) - apps/mcp-server (Claude MCP Server) - apps/whatsapp-service (WhatsApp Business API) - database/ (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
15 lines
376 B
JavaScript
15 lines
376 B
JavaScript
import assertString from './util/assertString';
|
|
import isBase64 from './isBase64';
|
|
export default function isJWT(str) {
|
|
assertString(str);
|
|
var dotSplit = str.split('.');
|
|
var len = dotSplit.length;
|
|
if (len !== 3) {
|
|
return false;
|
|
}
|
|
return dotSplit.reduce(function (acc, currElem) {
|
|
return acc && isBase64(currElem, {
|
|
urlSafe: true
|
|
});
|
|
}, true);
|
|
} |