michangarrito/apps/backend/node_modules/iterare/lib/utils.js
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
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>
2026-01-07 04:41:02 -06:00

21 lines
769 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function isIterator(candidate) {
return typeof candidate === 'object' && candidate !== null && typeof candidate.next === 'function';
}
exports.isIterator = isIterator;
function isIterable(candidate) {
return typeof candidate === 'object' && candidate !== null && typeof candidate[Symbol.iterator] === 'function';
}
exports.isIterable = isIterable;
function toIterator(collection) {
if (isIterator(collection)) {
return collection;
}
if (isIterable(collection)) {
return collection[Symbol.iterator]();
}
throw new Error('Passed collection is neither an Iterator nor an Iterable');
}
exports.toIterator = toIterator;
//# sourceMappingURL=utils.js.map