Files
n8n-nodes-strike/node_modules/esniff/resolve-separated.js
Martien 5605b9b49a Initial commit: n8n Strike API node
- Add Strike API credentials configuration
- Implement Strike node with 9 resources (Account, Balance, Currency Exchange, Deposit, Invoice, Payment, Payment Method, Payout, Rates)
- Add comprehensive operation descriptions for all resources
- Include CLAUDE.MD documentation
- Set up build configuration with TypeScript, ESLint, and Prettier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 11:00:38 +01:00

28 lines
942 B
JavaScript

"use strict";
var from = require("es5-ext/array/from")
, ensureString = require("type/string/ensure")
, primitiveSet = require("es5-ext/object/primitive-set")
, esniff = require("./");
var allowedSeparators = primitiveSet.apply(null, from(".+-*/,&|;"));
module.exports = function (code, sep/*, limit*/) {
var expressions, fromIndex, limit = arguments[2] || Infinity;
code = ensureString(code);
sep = ensureString(sep);
if (!allowedSeparators[sep]) throw new Error(sep + " is not supported separator");
expressions = [];
fromIndex = 0;
esniff(code, function (emitter) {
emitter.on("trigger:" + sep, function (accessor) {
if (accessor.scopeDepth !== 0) return;
var index = accessor.index;
if (expressions.push(code.slice(fromIndex, index)) === limit) accessor.stop();
fromIndex = index + 1;
});
});
if (expressions.length < limit) expressions.push(code.slice(fromIndex));
return expressions;
};