mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 13:31:00 +00:00
1 line
6.1 KiB
Plaintext
1 line
6.1 KiB
Plaintext
{"dependencies":[{"name":"./parse.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":35,"index":35}}],"key":"oIFLmnySivkJYDs32p5Nj0zvZXQ=","exportNames":["*"],"imports":1}},{"name":"./compile.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":36},"end":{"line":2,"column":49,"index":85}}],"key":"Hw6Aisl1ZUKcYyWdELQ0BzJIta4=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n Object.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return nthCheck;\n }\n });\n Object.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parseJs.parse;\n }\n });\n Object.defineProperty(exports, \"compile\", {\n enumerable: true,\n get: function () {\n return _compileJs.compile;\n }\n });\n Object.defineProperty(exports, \"generate\", {\n enumerable: true,\n get: function () {\n return _compileJs.generate;\n }\n });\n exports.sequence = sequence;\n var _parseJs = require(_dependencyMap[0], \"./parse.js\");\n var _compileJs = require(_dependencyMap[1], \"./compile.js\");\n /**\n * Parses and compiles a formula to a highly optimized function.\n * Combination of {@link parse} and {@link compile}.\n *\n * If the formula doesn't match any elements,\n * it returns [`boolbase`](https://github.com/fb55/boolbase)'s `falseFunc`.\n * Otherwise, a function accepting an _index_ is returned, which returns\n * whether or not the passed _index_ matches the formula.\n *\n * Note: The nth-rule starts counting at `1`, the returned function at `0`.\n *\n * @param formula The formula to compile.\n * @example\n * const check = nthCheck(\"2n+3\");\n *\n * check(0); // `false`\n * check(1); // `false`\n * check(2); // `true`\n * check(3); // `false`\n * check(4); // `true`\n * check(5); // `false`\n * check(6); // `true`\n */\n function nthCheck(formula) {\n return (0, _compileJs.compile)((0, _parseJs.parse)(formula));\n }\n /**\n * Parses and compiles a formula to a generator that produces a sequence of indices.\n * Combination of {@link parse} and {@link generate}.\n *\n * @param formula The formula to compile.\n * @returns A function that produces a sequence of indices.\n * @example <caption>Always increasing</caption>\n *\n * ```js\n * const gen = nthCheck.sequence('2n+3')\n *\n * gen() // `1`\n * gen() // `3`\n * gen() // `5`\n * gen() // `8`\n * gen() // `11`\n * ```\n *\n * @example <caption>With end value</caption>\n *\n * ```js\n *\n * const gen = nthCheck.sequence('-2n+5');\n *\n * gen() // 0\n * gen() // 2\n * gen() // 4\n * gen() // null\n * ```\n */\n function sequence(formula) {\n return (0, _compileJs.generate)((0, _parseJs.parse)(formula));\n }\n});","lineCount":93,"map":[[7,2,27,15,"Object"],[7,8,27,15],[7,9,27,15,"defineProperty"],[7,23,27,15],[7,24,27,15,"exports"],[7,31,27,15],[8,4,27,15,"enumerable"],[8,14,27,15],[9,4,27,15,"get"],[9,7,27,15],[9,18,27,15,"get"],[9,19,27,15],[10,6,27,15],[10,13,27,15,"nthCheck"],[10,21,27,15],[11,4,27,15],[12,2,27,15],[13,2,3,0,"Object"],[13,8,3,0],[13,9,3,0,"defineProperty"],[13,23,3,0],[13,24,3,0,"exports"],[13,31,3,0],[14,4,3,0,"enumerable"],[14,14,3,0],[15,4,3,0,"get"],[15,7,3,0],[15,18,3,0,"get"],[15,19,3,0],[16,6,3,0],[16,13,3,9,"parse"],[16,21,3,14],[16,22,3,14,"parse"],[16,27,3,14],[17,4,3,14],[18,2,3,14],[19,2,3,0,"Object"],[19,8,3,0],[19,9,3,0,"defineProperty"],[19,23,3,0],[19,24,3,0,"exports"],[19,31,3,0],[20,4,3,0,"enumerable"],[20,14,3,0],[21,4,3,0,"get"],[21,7,3,0],[21,18,3,0,"get"],[21,19,3,0],[22,6,3,0],[22,13,3,16,"compile"],[22,23,3,23],[22,24,3,23,"compile"],[22,31,3,23],[23,4,3,23],[24,2,3,23],[25,2,3,0,"Object"],[25,8,3,0],[25,9,3,0,"defineProperty"],[25,23,3,0],[25,24,3,0,"exports"],[25,31,3,0],[26,4,3,0,"enumerable"],[26,14,3,0],[27,4,3,0,"get"],[27,7,3,0],[27,18,3,0,"get"],[27,19,3,0],[28,6,3,0],[28,13,3,25,"generate"],[28,23,3,33],[28,24,3,33,"generate"],[28,32,3,33],[29,4,3,33],[30,2,3,33],[31,2,60,0,"exports"],[31,9,60,0],[31,10,60,0,"sequence"],[31,18,60,0],[31,21,60,0,"sequence"],[31,29,60,0],[32,2,1,0],[32,6,1,0,"_parseJs"],[32,14,1,0],[32,17,1,0,"require"],[32,24,1,0],[32,25,1,0,"_dependencyMap"],[32,39,1,0],[33,2,2,0],[33,6,2,0,"_compileJs"],[33,16,2,0],[33,19,2,0,"require"],[33,26,2,0],[33,27,2,0,"_dependencyMap"],[33,41,2,0],[34,2,4,0],[35,0,5,0],[36,0,6,0],[37,0,7,0],[38,0,8,0],[39,0,9,0],[40,0,10,0],[41,0,11,0],[42,0,12,0],[43,0,13,0],[44,0,14,0],[45,0,15,0],[46,0,16,0],[47,0,17,0],[48,0,18,0],[49,0,19,0],[50,0,20,0],[51,0,21,0],[52,0,22,0],[53,0,23,0],[54,0,24,0],[55,0,25,0],[56,0,26,0],[57,2,27,15],[57,11,27,24,"nthCheck"],[57,19,27,32,"nthCheck"],[57,20,27,33,"formula"],[57,27,27,40],[57,29,27,42],[58,4,28,4],[58,11,28,11],[58,15,28,11,"compile"],[58,25,28,18],[58,26,28,18,"compile"],[58,33,28,18],[58,35,28,19],[58,39,28,19,"parse"],[58,47,28,24],[58,48,28,24,"parse"],[58,53,28,24],[58,55,28,25,"formula"],[58,62,28,32],[58,63,28,33],[58,64,28,34],[59,2,29,0],[60,2,30,0],[61,0,31,0],[62,0,32,0],[63,0,33,0],[64,0,34,0],[65,0,35,0],[66,0,36,0],[67,0,37,0],[68,0,38,0],[69,0,39,0],[70,0,40,0],[71,0,41,0],[72,0,42,0],[73,0,43,0],[74,0,44,0],[75,0,45,0],[76,0,46,0],[77,0,47,0],[78,0,48,0],[79,0,49,0],[80,0,50,0],[81,0,51,0],[82,0,52,0],[83,0,53,0],[84,0,54,0],[85,0,55,0],[86,0,56,0],[87,0,57,0],[88,0,58,0],[89,0,59,0],[90,2,60,7],[90,11,60,16,"sequence"],[90,19,60,24,"sequence"],[90,20,60,25,"formula"],[90,27,60,32],[90,29,60,34],[91,4,61,4],[91,11,61,11],[91,15,61,11,"generate"],[91,25,61,19],[91,26,61,19,"generate"],[91,34,61,19],[91,36,61,20],[91,40,61,20,"parse"],[91,48,61,25],[91,49,61,25,"parse"],[91,54,61,25],[91,56,61,26,"formula"],[91,63,61,33],[91,64,61,34],[91,65,61,35],[92,2,62,0],[93,0,62,1],[93,3]],"functionMap":{"names":["<global>","nthCheck","sequence"],"mappings":"AAA;eC0B;CDE;OE+B;CFE"},"hasCjsExports":false},"type":"js/module"}]} |