Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kizahasi/flocon-script

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kizahasi/flocon-script - npm Package Compare versions

Comparing version 0.8.1-beta.4 to 0.8.1-beta.5

18

dist/cjs/scriptValue/FArray.js

@@ -30,3 +30,3 @@ "use strict";

}
iterateAsArray() {
toJArray() {
return this.source.map(x => this.convert(x));

@@ -58,3 +58,3 @@ }

const predicate = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false);
const raw = this.iterateAsArray().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
const raw = this.toJArray().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
return FArray.create(raw);

@@ -66,3 +66,3 @@ });

const predicate = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false);
const raw = this.iterateAsArray().find((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
const raw = this.toJArray().find((value, index) => { var _a; return (_a = predicate([value, new FNumber_1.FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
return raw;

@@ -74,3 +74,3 @@ });

const callbackfn = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false);
this.iterateAsArray().forEach((value, index) => callbackfn([value, new FNumber_1.FNumber(index)]));
this.toJArray().forEach((value, index) => callbackfn([value, new FNumber_1.FNumber(index)]));
return undefined;

@@ -82,3 +82,3 @@ });

const mapping = (0, cast_1.beginCast)(args[0], astInfo).addFunction().cast()(false);
const raw = this.iterateAsArray().map((value, index) => mapping([value, new FNumber_1.FNumber(index)]));
const raw = this.toJArray().map((value, index) => mapping([value, new FNumber_1.FNumber(index)]));
return FArray.create(raw);

@@ -134,3 +134,3 @@ });

toPrimitiveAsString() {
return this.iterateAsArray()
return this.toJArray()
.map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsString())

@@ -140,7 +140,7 @@ .toString();

toPrimitiveAsNumber() {
return +this.iterateAsArray().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber());
return +this.toJArray().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber());
}
// 正確な型が表現できないのでunknown[]としている
toJObject() {
return this.iterateAsArray().map(x => (x == null ? x : x.toJObject()));
return this.toJArray().map(x => (x == null ? x : x.toJObject()));
}

@@ -155,2 +155,2 @@ }

exports.FTypedArray = FTypedArray;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRkFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NjcmlwdFZhbHVlL0ZBcnJheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxnREFBNkM7QUFDN0Msc0RBQW1EO0FBQ25ELGlDQUFtQztBQUNuQywyQ0FBd0M7QUFDeEMsMkNBQXdDO0FBQ3hDLHVDQUFvQztBQUNwQyxtQ0FBZ0M7QUFFaEMscURBQWtEO0FBQ2xELDJEQUF3RDtBQUd4RCxNQUFhLE1BQU07SUFDZixZQUNxQixNQUFpQixFQUNqQixPQUFtQyxFQUNuQyxXQUFxRTtRQUZyRSxXQUFNLEdBQU4sTUFBTSxDQUFXO1FBQ2pCLFlBQU8sR0FBUCxPQUFPLENBQTRCO1FBQ25DLGdCQUFXLEdBQVgsV0FBVyxDQUEwRDtJQUN2RixDQUFDO0lBRUksTUFBTSxDQUFDLHFCQUFxQixDQUFDLEtBQWMsRUFBRSxPQUE0QjtRQUM3RSxJQUFJLEtBQUssRUFBRTtZQUNQLE1BQU0seUJBQVcsQ0FBQyxtQkFBbUIsQ0FBQyxPQUFPLGFBQV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AoZm91bmQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KGZvdW5kKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBwcm9wZXJ0eU5hbWUgPSBpbmRleDtcbiAgICAgICAgc3dpdGNoIChwcm9wZXJ0eU5hbWUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2ZpbHRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlZGljYXRlID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZpbHRlcigodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmaW5kJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmVkaWNhdGUgPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByYXcgPSB0aGlzLml0ZXJhdGVBc0FycmF5KCkuZmluZCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByYXc7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmb3JFYWNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja2ZuID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZvckVhY2goKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrZm4oW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnbWFwJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXBwaW5nID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLm1hcCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZyhbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwb3AnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuc291cmNlLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwdXNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLmZvckVhY2goYXJnID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UucHVzaChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ3NoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICd1bnNoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLnJlZHVjZVJpZ2h0PHZvaWQ+KChzZWVkLCBhcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UudW5zaGlmdChuZXd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gICBgXCIke3R5cGVvZiBpbmRleCA9PT0gJ3N5bWJvbCcgPyAnc3ltYm9sJyA6IGluZGV4fVwiIGlzIG5vdCBzdXBwb3J0ZWRgLFxuICAgICAgICAgICAgYXN0SW5mbz8ucmFuZ2VcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgdG9QcmltaXRpdmVBc1N0cmluZygpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gdGhpcy5pdGVyYXRlQXNBcnJheSgpXG4gICAgICAgICAgICAubWFwKHggPT4geD8udG9QcmltaXRpdmVBc1N0cmluZygpKVxuICAgICAgICAgICAgLnRvU3RyaW5nKCk7XG4gICAgfVxuXG4gICAgcHVibGljIHRvUHJpbWl0aXZlQXNOdW1iZXIoKTogbnVtYmVyIHtcbiAgICAgICAgcmV0dXJuICt0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4geD8udG9QcmltaXRpdmVBc051bWJlcigpKTtcbiAgICB9XG5cbiAgICAvLyDmraPnorrjgarlnovjgYzooajnj77jgafjgY3jgarjgYTjga7jgad1bmtub3duW13jgajjgZfjgabjgYTjgotcbiAgICBwdWJsaWMgdG9KT2JqZWN0KCk6IHVua25vd25bXSB7XG4gICAgICAgIHJldHVybiB0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4gKHggPT0gbnVsbCA/IHggOiB4LnRvSk9iamVjdCgpKSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgRlR5cGVkQXJyYXk8VD4gZXh0ZW5kcyBGQXJyYXkge1xuICAgIHB1YmxpYyBjb25zdHJ1Y3RvcihcbiAgICAgICAgc291cmNlOiBUW10sXG4gICAgICAgIGNvbnZlcnQ6ICh2YWx1ZTogVCkgPT4gRlZhbHVlLFxuICAgICAgICBjb252ZXJ0QmFjazogKHZhbHVlOiBGVmFsdWUsIGFzdEluZm86IEFzdEluZm8gfCB1bmRlZmluZWQpID0+IFRcbiAgICApIHtcbiAgICAgICAgc3VwZX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RvcjxGVmFsdWU+IHtcbiAgICAgICAgcmV0dXJuIG1hcEl0ZXJhdG9yKHRoaXMuc291cmNlW1N5bWJvbC5pdGVyYXRvcl0oKSwgeCA9PiB0aGlzLmNvbnZlcnQoeCkpO1xuICAgIH1cblxuICAgIHByaXZhdGUgc3RhdGljIGlzVmFsaWRJbmRleChpbmRleDogc3RyaW5nIHwgc3ltYm9sIHwgdW5kZWZpbmVkKTogYm9vbGVhbiB7XG4gICAgICAgIGlmIChpbmRleCA9PSBudWxsIHx8IHR5cGVvZiBpbmRleCA9PT0gJ3N5bWJvbCcpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaW5kZXggPT09ICcwJyB8fCAvXlsxLTldWzAtOV0qJC8udGVzdChpbmRleCk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldCh7IHByb3BlcnR5LCBhc3RJbmZvIH06IEdldFBhcmFtcyk6IEZWYWx1ZSB7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gdHJ5VG9Qcm9wZXJ0eU5hbWUocHJvcGVydHkpO1xuICAgICAgICBpZiAoRkFycmF5LmlzVmFsaWRJbmRleChpbmRleCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvdW5kID0gdGhpcy5zb3VyY2VbaW5kZXggYXMgdW5rbm93biBhcyBudW1iZXJdO1xuICAgICAgICAgICAgaWYgKGZvdW5kID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChmb3VuZCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgcHJvcGVydHlOYW1lID0gaW5kZXg7XG4gICAgICAgIHN3aXRjaCAocHJvcGVydHlOYW1lKSB7XG4gICAgICAgICAgICBjYXNlICdmaWx0ZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZWRpY2F0ZSA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMudG9KQXJyYXkoKS5maWx0ZXIoKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHByZWRpY2F0ZShbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pPy50b0pPYmplY3QoKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFycmF5LmNyZWF0ZShyYXcpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZmluZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlZGljYXRlID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy50b0pBcnJheSgpLmZpbmQoKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHByZWRpY2F0ZShbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pPy50b0pPYmplY3QoKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmF3O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZm9yRWFjaCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2FsbGJhY2tmbiA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudG9KQXJyYXkoKS5mb3JFYWNoKCh2YWx1ZSwgaW5kZXgpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja2ZuKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ21hcCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWFwcGluZyA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMudG9KQXJyYXkoKS5tYXAoKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcHBpbmcoW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFycmF5LmNyZWF0ZShyYXcpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAncG9wJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5wb3AoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAncHVzaCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgYXJncy5mb3JFYWNoKGFyZyA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHRoaXMuY29udmVydEJhY2soYXJnLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlLnB1c2gobmV3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGTnVtYmVyKHRoaXMuc291cmNlLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdzaGlmdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5zb3VyY2Uuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAndW5zaGlmdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgYXJncy5yZWR1Y2VSaWdodDx2b2lkPigoc2VlZCwgYXJnKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHRoaXMuY29udmVydEJhY2soYXJnLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlLnVuc2hpZnQobmV3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9LCB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgU3ltYm9sLml0ZXJhdG9yOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mby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1cblxuICAgIHB1YmxpYyB0b1ByaW1pdGl2ZUFzTnVtYmVyKCk6IG51bWJlciB7XG4gICAgICAgIHJldHVybiArdGhpcy50b0pBcnJheSgpLm1hcCh4ID0+IHg/LnRvUHJpbWl0aXZlQXNOdW1iZXIoKSk7XG4gICAgfVxuXG4gICAgLy8g5q2j56K644Gq5Z6L44GM6KGo54++44Gn44GN44Gq44GE44Gu44GndW5rbm93bltd44Go44GX44Gm44GE44KLXG4gICAgcHVibGljIHRvSk9iamVjdCgpOiB1bmtub3duW10ge1xuICAgICAgICByZXR1cm4gdGhpcy50b0pBcnJheSgpLm1hcCh4ID0+ICh4ID09IG51bGwgPyB4IDogeC50b0pPYmplY3QoKSkpO1xuICAgIH1cbn1cblxuZXhwb3J0IGNsYXNzIEZUeXBlZEFycmF5PFQ+IGV4dGVuZHMgRkFycmF5IHtcbiAgICBwdWJsaWMgY29uc3RydWN0b3IoXG4gICAgICAgIHNvdXJjZTogVFtdLFxuICAgICAgICBjb252ZXJ0OiAodmFsdWU6IFQpID0+IEZWYWx1ZSxcbiAgICAgICAgY29udmVydEJhY2s6ICh2YWx1ZTogRlZhbHVlLCBhc3RJbmZvOiBBc3RJbmZvIHwgdW5kZWZpbmVkKSA9PiBUXG4gICAgKSB7XG4gICAgICAgIHN1cGVyKHNvdXJjZSwgdmFsdWUgPT4gY29udmVydCh2YWx1ZSBhcyBUKSwgY29udmVydEJhY2spO1xuICAgIH1cbn1cbiJdfQ==

@@ -27,3 +27,3 @@ import { ScriptError } from '../ScriptError';

}
iterateAsArray() {
toJArray() {
return this.source.map(x => this.convert(x));

@@ -55,3 +55,3 @@ }

const predicate = beginCast(args[0], astInfo).addFunction().cast()(false);
const raw = this.iterateAsArray().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
const raw = this.toJArray().filter((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
return FArray.create(raw);

@@ -63,3 +63,3 @@ });

const predicate = beginCast(args[0], astInfo).addFunction().cast()(false);
const raw = this.iterateAsArray().find((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
const raw = this.toJArray().find((value, index) => { var _a; return (_a = predicate([value, new FNumber(index)])) === null || _a === void 0 ? void 0 : _a.toJObject(); });
return raw;

@@ -71,3 +71,3 @@ });

const callbackfn = beginCast(args[0], astInfo).addFunction().cast()(false);
this.iterateAsArray().forEach((value, index) => callbackfn([value, new FNumber(index)]));
this.toJArray().forEach((value, index) => callbackfn([value, new FNumber(index)]));
return undefined;

@@ -79,3 +79,3 @@ });

const mapping = beginCast(args[0], astInfo).addFunction().cast()(false);
const raw = this.iterateAsArray().map((value, index) => mapping([value, new FNumber(index)]));
const raw = this.toJArray().map((value, index) => mapping([value, new FNumber(index)]));
return FArray.create(raw);

@@ -131,3 +131,3 @@ });

toPrimitiveAsString() {
return this.iterateAsArray()
return this.toJArray()
.map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsString())

@@ -137,7 +137,7 @@ .toString();

toPrimitiveAsNumber() {
return +this.iterateAsArray().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber());
return +this.toJArray().map(x => x === null || x === void 0 ? void 0 : x.toPrimitiveAsNumber());
}
// 正確な型が表現できないのでunknown[]としている
toJObject() {
return this.iterateAsArray().map(x => (x == null ? x : x.toJObject()));
return this.toJArray().map(x => (x == null ? x : x.toJObject()));
}

@@ -150,2 +150,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRkFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NjcmlwdFZhbHVlL0ZBcnJheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0J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MuY29udmVydCh4KSk7XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBzdGF0aWMgaXNWYWxpZEluZGV4KGluZGV4OiBzdHJpbmcgfCBzeW1ib2wgfCB1bmRlZmluZWQpOiBib29sZWFuIHtcbiAgICAgICAgaWYgKGluZGV4ID09IG51bGwgfHwgdHlwZW9mIGluZGV4ID09PSAnc3ltYm9sJykge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBpbmRleCA9PT0gJzAnIHx8IC9eWzEtOV1bMC05XSokLy50ZXN0KGluZGV4KTtcbiAgICB9XG5cbiAgICBwdWJsaWMgZ2V0KHsgcHJvcGVydHksIGFzdEluZm8gfTogR2V0UGFyYW1zKTogRlZhbHVlIHtcbiAgICAgICAgY29uc3QgaW5kZXggPSB0cnlUb1Byb3BlcnR5TmFtZShwcm9wZXJ0eSk7XG4gICAgICAgIGlmIChGQXJyYXkuaXNWYWxpZEluZGV4KGluZGV4KSkge1xuICAgICAgICAgICAgY29uc3QgZm91bmQgPSB0aGlzLnNvdXJjZVtpbmRleCBhcyB1bmtub3duIGFzIG51bWJlcl07XG4gICAgICAgICAgICBpZiAoZm91bmQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KGZvdW5kKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBwcm9wZXJ0eU5hbWUgPSBpbmRleDtcbiAgICAgICAgc3dpdGNoIChwcm9wZXJ0eU5hbWUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2ZpbHRlcic6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlZGljYXRlID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZpbHRlcigodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmaW5kJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmVkaWNhdGUgPSBiZWdpbkNhc3QoYXJnc1swXSwgYXN0SW5mbykuYWRkRnVuY3Rpb24oKS5jYXN0KCkoZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByYXcgPSB0aGlzLml0ZXJhdGVBc0FycmF5KCkuZmluZCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGljYXRlKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSk/LnRvSk9iamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByYXc7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdmb3JFYWNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja2ZuID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pdGVyYXRlQXNBcnJheSgpLmZvckVhY2goKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrZm4oW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnbWFwJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtYXBwaW5nID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy5pdGVyYXRlQXNBcnJheSgpLm1hcCgodmFsdWUsIGluZGV4KSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZyhbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBGQXJyYXkuY3JlYXRlKHJhdyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwb3AnOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuc291cmNlLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdwdXNoJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLmZvckVhY2goYXJnID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UucHVzaChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ3NoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0KHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICd1bnNoaWZ0JzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBhcmdzLCBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBhcmdzLnJlZHVjZVJpZ2h0PHZvaWQ+KChzZWVkLCBhcmcpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld1ZhbHVlID0gdGhpcy5jb252ZXJ0QmFjayhhcmcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zb3VyY2UudW5zaGlmdChuZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH0sIHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRk51bWJlcih0aGlzLnNvdXJjZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSBTeW1ib2wuaXRlcmF0b3I6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc291cmNlID0gdGhpcy5zb3VyY2VbU3ltYm9sLml0ZX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iAgICAgICAgcmV0dXJuICt0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4geD8udG9QcmltaXRpdmVBc051bWJlcigpKTtcbiAgICB9XG5cbiAgICAvLyDmraPnorrjgarlnovjgYzooajnj77jgafjgY3jgarjgYTjga7jgad1bmtub3duW13jgajjgZfjgabjgYTjgotcbiAgICBwdWJsaWMgdG9KT2JqZWN0KCk6IHVua25vd25bXSB7XG4gICAgICAgIHJldHVybiB0aGlzLml0ZXJhdGVBc0FycmF5KCkubWFwKHggPT4gKHggPT0gbnVsbCA/IHggOiB4LnRvSk9iamVjdCgpKSk7XG4gICAgfVxufVxuXG5leHBvcnQgY2xhc3MgRlR5cGVkQXJyYXk8VD4gZXh0ZW5kcyBGQXJyYXkge1xuICAgIHB1YmxpYyBjb25zdHJ1Y3RvcihcbiAgICAgICAgc291cmNlOiBUW10sXG4gICAgICAgIGNvbnZlcnQ6ICh2YWx1ZTogVCkgPT4gRlZhbHVlLFxuICAgICAgICBjb252ZXJ0QmFjazogKHZhbHVlOiBGVmFsdWUsIGFzdEluZm86IEFzdEluZm8gfCB1bmRlZmluZWQpID0+IFRcbiAgICApIHtcbiAgICAgICAgc3VwZXIoc291cmNlLCB2YWx1ZSA9PiBjb252ZXJ0KHZhbHVlIGFzIFQpLCBjb252ZXJ0QmFjayk7XG4gICAgfVxufVxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRkFycmF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NjcmlwdFZhbHVlL0ZBcnJheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDN0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ25ELE9BQU8sRUFBRSxTQUFTLEVBQUUsT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xuICAgIHByaXZhdGUgc3RhdGljIGlzVmFsaWRJbmRleChpbmRleDogc3RyaW5nIHwgc3ltYm9sIHwgdW5kZWZpbmVkKTogYm9vbGVhbiB7XG4gICAgICAgIGlmIChpbmRleCA9PSBudWxsIHx8IHR5cGVvZiBpbmRleCA9PT0gJ3N5bWJvbCcpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaW5kZXggPT09ICcwJyB8fCAvXlsxLTldWzAtOV0qJC8udGVzdChpbmRleCk7XG4gICAgfVxuXG4gICAgcHVibGljIGdldCh7IHByb3BlcnR5LCBhc3RJbmZvIH06IEdldFBhcmFtcyk6IEZWYWx1ZSB7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gdHJ5VG9Qcm9wZXJ0eU5hbWUocHJvcGVydHkpO1xuICAgICAgICBpZiAoRkFycmF5LmlzVmFsaWRJbmRleChpbmRleCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGZvdW5kID0gdGhpcy5zb3VyY2VbaW5kZXggYXMgdW5rbm93biBhcyBudW1iZXJdO1xuICAgICAgICAgICAgaWYgKGZvdW5kID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChmb3VuZCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgcHJvcGVydHlOYW1lID0gaW5kZXg7XG4gICAgICAgIHN3aXRjaCAocHJvcGVydHlOYW1lKSB7XG4gICAgICAgICAgICBjYXNlICdmaWx0ZXInOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGFyZ3MsIGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZWRpY2F0ZSA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMudG9KQXJyYXkoKS5maWx0ZXIoKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHByZWRpY2F0ZShbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pPy50b0pPYmplY3QoKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFycmF5LmNyZWF0ZShyYXcpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZmluZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlZGljYXRlID0gYmVnaW5DYXN0KGFyZ3NbMF0sIGFzdEluZm8pLmFkZEZ1bmN0aW9uKCkuY2FzdCgpKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmF3ID0gdGhpcy50b0pBcnJheSgpLmZpbmQoKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHByZWRpY2F0ZShbdmFsdWUsIG5ldyBGTnVtYmVyKGluZGV4KV0pPy50b0pPYmplY3QoKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmF3O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAnZm9yRWFjaCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2FsbGJhY2tmbiA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudG9KQXJyYXkoKS5mb3JFYWNoKCh2YWx1ZSwgaW5kZXgpID0+XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja2ZuKFt2YWx1ZSwgbmV3IEZOdW1iZXIoaW5kZXgpXSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgJ21hcCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbWFwcGluZyA9IGJlZ2luQ2FzdChhcmdzWzBdLCBhc3RJbmZvKS5hZGRGdW5jdGlvbigpLmNhc3QoKShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhdyA9IHRoaXMudG9KQXJyYXkoKS5tYXAoKHZhbHVlLCBpbmRleCkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcHBpbmcoW3ZhbHVlLCBuZXcgRk51bWJlcihpbmRleCldKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRkFycmF5LmNyZWF0ZShyYXcpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAncG9wJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZGdW5jdGlvbigoeyBpc05ldyB9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIEZBcnJheS5wcmVwYXJlSW5zdGFuY2VNZXRob2QoaXNOZXcsIGFzdEluZm8pO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSB0aGlzLnNvdXJjZS5wb3AoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAncHVzaCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgYXJncy5mb3JFYWNoKGFyZyA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHRoaXMuY29udmVydEJhY2soYXJnLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlLnB1c2gobmV3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGTnVtYmVyKHRoaXMuc291cmNlLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjYXNlICdzaGlmdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gdGhpcy5zb3VyY2Uuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydChyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY2FzZSAndW5zaGlmdCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBGRnVuY3Rpb24oKHsgYXJncywgaXNOZXcgfSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBGQXJyYXkucHJlcGFyZUluc3RhbmNlTWV0aG9kKGlzTmV3LCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgYXJncy5yZWR1Y2VSaWdodDx2b2lkPigoc2VlZCwgYXJnKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHRoaXMuY29udmVydEJhY2soYXJnLCBhc3RJbmZvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc291cmNlLnVuc2hpZnQobmV3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9LCB1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IEZOdW1iZXIodGhpcy5zb3VyY2UubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNhc2UgU3ltYm9sLml0ZXJhdG9yOlxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgRkZ1bmN0aW9uKCh7IGlzTmV3IH0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgRkFycmF5LnByZXBhcmVJbnN0YW5jZU1ldGhvZChpc05ldywgYXN0SW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNvdXJjZSA9IHRoaXMuc291cmNlW1N5bWJvbC5pdGVyYXRvcl0oKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZJdGVyYXRvci5jcmVh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iZXIoKSk7XG4gICAgfVxuXG4gICAgLy8g5q2j56K644Gq5Z6L44GM6KGo54++44Gn44GN44Gq44GE44Gu44GndW5rbm93bltd44Go44GX44Gm44GE44KLXG4gICAgcHVibGljIHRvSk9iamVjdCgpOiB1bmtub3duW10ge1xuICAgICAgICByZXR1cm4gdGhpcy50b0pBcnJheSgpLm1hcCh4ID0+ICh4ID09IG51bGwgPyB4IDogeC50b0pPYmplY3QoKSkpO1xuICAgIH1cbn1cblxuZXhwb3J0IGNsYXNzIEZUeXBlZEFycmF5PFQ+IGV4dGVuZHMgRkFycmF5IHtcbiAgICBwdWJsaWMgY29uc3RydWN0b3IoXG4gICAgICAgIHNvdXJjZTogVFtdLFxuICAgICAgICBjb252ZXJ0OiAodmFsdWU6IFQpID0+IEZWYWx1ZSxcbiAgICAgICAgY29udmVydEJhY2s6ICh2YWx1ZTogRlZhbHVlLCBhc3RJbmZvOiBBc3RJbmZvIHwgdW5kZWZpbmVkKSA9PiBUXG4gICAgKSB7XG4gICAgICAgIHN1cGVyKHNvdXJjZSwgdmFsdWUgPT4gY29udmVydCh2YWx1ZSBhcyBUKSwgY29udmVydEJhY2spO1xuICAgIH1cbn1cbiJdfQ==

@@ -12,3 +12,3 @@ import { FType } from './FType';

get type(): typeof FType.Array;
private iterateAsArray;
toJArray(): FValue[];
iterate(): IterableIterator<FValue>;

@@ -15,0 +15,0 @@ private static isValidIndex;

{
"version": "0.8.1-beta.4",
"version": "0.8.1-beta.5",
"license": "MIT",

@@ -31,3 +31,2 @@ "main": "dist/cjs/index.js",

"author": "kizahasi",
"description": "Executes javascript safely, but some features are not supported.",
"repository": {

@@ -42,11 +41,11 @@ "type": "git",

"@types/jest": "27.0.2",
"@typescript-eslint/eslint-plugin": "4.32.0",
"@typescript-eslint/parser": "4.32.0",
"eslint": "7.32.0",
"@typescript-eslint/eslint-plugin": "5.1.0",
"@typescript-eslint/parser": "5.1.0",
"eslint": "8.1.0",
"eslint-config-prettier": "8.3.0",
"husky": "7.0.2",
"jest": "27.2.5",
"husky": "7.0.4",
"jest": "27.3.1",
"prettier": "2.4.1",
"rimraf": "3.0.2",
"ts-jest": "27.0.5",
"ts-jest": "27.0.7",
"typescript": "4.4.4"

@@ -53,0 +52,0 @@ },

# @kizahasi/flocon-script
A sandboxed JavaScript-like language interpreter in JavaScript. One of core libraries for Flocon project.
![GitHub](https://img.shields.io/github/license/kizahasi/flocon-script) [![npm version](https://img.shields.io/npm/v/@kizahasi/flocon-script.svg?style=flat)](https://www.npmjs.com/package/@kizahasi/flocon-script) [![CI](https://github.com/kizahasi/flocon-script/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kizahasi/flocon-script/actions/workflows/ci.yml) [![publish](https://github.com/kizahasi/flocon-script/actions/workflows/publish.yml/badge.svg?branch=release)](https://github.com/kizahasi/flocon-script/actions/workflows/publish.yml)
Executes javascript safely, but some features are not supported.
## Install
`npm install @kizahasi/flocon-script` or `yarn add @kizahasi/flocon-script`
## Usage
```typescript
import {
exec,
arrayClass,
mapClass,
symbolClass,
createConsoleClass,
} from '@kizahasi/flocon-script';
const globalThis = {
Array: arrayClass,
Map: mapClass,
Symbol: symbolClass,
console: createConsoleClass('[MY HEADER!]'),
};
const execResult = exec(
`
const i = 1 + 2;
const array = [i];
console.log(Array.isArray(array));
array
`,
globalThis
);
console.log(execResult.result); // [3]
```
## License
Released under MIT License
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc