aurix-ai 2.7.2 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/AgentLoop.d.ts.map +1 -1
- package/dist/agent/AgentLoop.js +1 -52
- package/dist/agent/AgentLoop.js.map +1 -1
- package/dist/cli/App.d.ts.map +1 -1
- package/dist/cli/App.js +6 -0
- package/dist/cli/App.js.map +1 -1
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +7 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/tools/Browser.d.ts.map +1 -1
- package/dist/tools/Browser.js +46 -625
- package/dist/tools/Browser.js.map +1 -1
- package/dist/tools/captcha/CaptchaRouter.d.ts +6 -0
- package/dist/tools/captcha/CaptchaRouter.d.ts.map +1 -0
- package/dist/tools/captcha/CaptchaRouter.js +371 -0
- package/dist/tools/captcha/CaptchaRouter.js.map +1 -0
- package/dist/tools/captcha/RecaptchaSolver.d.ts +2 -0
- package/dist/tools/captcha/RecaptchaSolver.d.ts.map +1 -0
- package/dist/tools/captcha/RecaptchaSolver.js +1114 -0
- package/dist/tools/captcha/RecaptchaSolver.js.map +1 -0
- package/dist/tools/captcha/common.d.ts +35 -0
- package/dist/tools/captcha/common.d.ts.map +1 -0
- package/dist/tools/captcha/common.js +445 -0
- package/dist/tools/captcha/common.js.map +1 -0
- package/dist/tools/captcha/index.d.ts +5 -0
- package/dist/tools/captcha/index.d.ts.map +1 -0
- package/dist/tools/captcha/index.js +4 -0
- package/dist/tools/captcha/index.js.map +1 -0
- package/package.json +1 -2
- package/scripts/build.cjs +0 -15
- package/scripts/run-task.mjs +86 -0
- package/native/token-counter/index.d.ts +0 -7
- package/native/token-counter/index.js +0 -316
- package/native/token-counter/node_modules/.package-lock.json +0 -568
- package/native/token-counter/node_modules/2/array.js +0 -25
- package/native/token-counter/node_modules/2/index.js +0 -12
- package/native/token-counter/node_modules/2/iterator.js +0 -13
- package/native/token-counter/node_modules/2/license.txt +0 -21
- package/native/token-counter/node_modules/2/map.js +0 -27
- package/native/token-counter/node_modules/2/number.js +0 -109
- package/native/token-counter/node_modules/2/object.js +0 -23
- package/native/token-counter/node_modules/2/package.json +0 -60
- package/native/token-counter/node_modules/2/readme.md +0 -246
- package/native/token-counter/node_modules/2/string.js +0 -11
- package/native/token-counter/node_modules/2/test.js +0 -520
- package/native/token-counter/node_modules/@lamansky/every/index.js +0 -16
- package/native/token-counter/node_modules/@lamansky/every/license.txt +0 -21
- package/native/token-counter/node_modules/@lamansky/every/package.json +0 -38
- package/native/token-counter/node_modules/@lamansky/every/readme.md +0 -46
- package/native/token-counter/node_modules/@lamansky/flatten/index.js +0 -5
- package/native/token-counter/node_modules/@lamansky/flatten/license.txt +0 -21
- package/native/token-counter/node_modules/@lamansky/flatten/package.json +0 -35
- package/native/token-counter/node_modules/@lamansky/flatten/readme.md +0 -41
- package/native/token-counter/node_modules/@napi-rs/cli/LICENSE +0 -21
- package/native/token-counter/node_modules/@napi-rs/cli/README.md +0 -96
- package/native/token-counter/node_modules/@napi-rs/cli/package.json +0 -65
- package/native/token-counter/node_modules/@napi-rs/cli/scripts/index.js +0 -51371
- package/native/token-counter/node_modules/add-counter/index.js +0 -3
- package/native/token-counter/node_modules/add-counter/license.txt +0 -21
- package/native/token-counter/node_modules/add-counter/package.json +0 -34
- package/native/token-counter/node_modules/add-counter/readme.md +0 -36
- package/native/token-counter/node_modules/array-pad/LICENSE +0 -22
- package/native/token-counter/node_modules/array-pad/README.md +0 -80
- package/native/token-counter/node_modules/array-pad/index.js +0 -30
- package/native/token-counter/node_modules/array-pad/package.json +0 -28
- package/native/token-counter/node_modules/arrify/index.js +0 -8
- package/native/token-counter/node_modules/arrify/license +0 -21
- package/native/token-counter/node_modules/arrify/package.json +0 -33
- package/native/token-counter/node_modules/arrify/readme.md +0 -36
- package/native/token-counter/node_modules/case-insensitive/index.js +0 -72
- package/native/token-counter/node_modules/case-insensitive/license.txt +0 -21
- package/native/token-counter/node_modules/case-insensitive/package.json +0 -39
- package/native/token-counter/node_modules/case-insensitive/readme.md +0 -39
- package/native/token-counter/node_modules/case-insensitive/test.js +0 -114
- package/native/token-counter/node_modules/class-chain/index.js +0 -32
- package/native/token-counter/node_modules/class-chain/license.txt +0 -21
- package/native/token-counter/node_modules/class-chain/package.json +0 -39
- package/native/token-counter/node_modules/class-chain/readme.md +0 -23
- package/native/token-counter/node_modules/class-chain/test.js +0 -77
- package/native/token-counter/node_modules/copy-own/index.js +0 -10
- package/native/token-counter/node_modules/copy-own/license.txt +0 -21
- package/native/token-counter/node_modules/copy-own/package.json +0 -37
- package/native/token-counter/node_modules/copy-own/readme.md +0 -67
- package/native/token-counter/node_modules/def-props/index.js +0 -43
- package/native/token-counter/node_modules/def-props/license.txt +0 -21
- package/native/token-counter/node_modules/def-props/node_modules/is-obj/index.d.ts +0 -22
- package/native/token-counter/node_modules/def-props/node_modules/is-obj/index.js +0 -6
- package/native/token-counter/node_modules/def-props/node_modules/is-obj/license +0 -9
- package/native/token-counter/node_modules/def-props/node_modules/is-obj/package.json +0 -34
- package/native/token-counter/node_modules/def-props/node_modules/is-obj/readme.md +0 -39
- package/native/token-counter/node_modules/def-props/package.json +0 -51
- package/native/token-counter/node_modules/def-props/readme.md +0 -117
- package/native/token-counter/node_modules/empty-iterator/index.js +0 -3
- package/native/token-counter/node_modules/empty-iterator/license.txt +0 -21
- package/native/token-counter/node_modules/empty-iterator/package.json +0 -33
- package/native/token-counter/node_modules/empty-iterator/readme.md +0 -23
- package/native/token-counter/node_modules/enforce-range/index.js +0 -15
- package/native/token-counter/node_modules/enforce-range/license.txt +0 -21
- package/native/token-counter/node_modules/enforce-range/node_modules/2/array.js +0 -43
- package/native/token-counter/node_modules/enforce-range/node_modules/2/index.js +0 -10
- package/native/token-counter/node_modules/enforce-range/node_modules/2/iterator.js +0 -26
- package/native/token-counter/node_modules/enforce-range/node_modules/2/license.txt +0 -21
- package/native/token-counter/node_modules/enforce-range/node_modules/2/map.js +0 -47
- package/native/token-counter/node_modules/enforce-range/node_modules/2/number.js +0 -33
- package/native/token-counter/node_modules/enforce-range/node_modules/2/object.js +0 -61
- package/native/token-counter/node_modules/enforce-range/node_modules/2/package.json +0 -41
- package/native/token-counter/node_modules/enforce-range/node_modules/2/readme.md +0 -210
- package/native/token-counter/node_modules/enforce-range/node_modules/2/string.js +0 -37
- package/native/token-counter/node_modules/enforce-range/node_modules/2/test.js +0 -413
- package/native/token-counter/node_modules/enforce-range/package.json +0 -36
- package/native/token-counter/node_modules/enforce-range/readme.md +0 -53
- package/native/token-counter/node_modules/english-list/.travis.yml +0 -6
- package/native/token-counter/node_modules/english-list/LICENSE +0 -22
- package/native/token-counter/node_modules/english-list/README.md +0 -44
- package/native/token-counter/node_modules/english-list/index.js +0 -34
- package/native/token-counter/node_modules/english-list/package.json +0 -31
- package/native/token-counter/node_modules/english-list/test.log +0 -6
- package/native/token-counter/node_modules/errate/index.js +0 -19
- package/native/token-counter/node_modules/errate/license.txt +0 -21
- package/native/token-counter/node_modules/errate/package.json +0 -39
- package/native/token-counter/node_modules/errate/readme.md +0 -79
- package/native/token-counter/node_modules/ffn/index.js +0 -9
- package/native/token-counter/node_modules/ffn/license.txt +0 -21
- package/native/token-counter/node_modules/ffn/package.json +0 -34
- package/native/token-counter/node_modules/ffn/readme.md +0 -51
- package/native/token-counter/node_modules/get-own-property/index.js +0 -5
- package/native/token-counter/node_modules/get-own-property/license.txt +0 -21
- package/native/token-counter/node_modules/get-own-property/package.json +0 -31
- package/native/token-counter/node_modules/get-own-property/readme.md +0 -22
- package/native/token-counter/node_modules/has-duplicates/index.js +0 -11
- package/native/token-counter/node_modules/has-duplicates/license.txt +0 -21
- package/native/token-counter/node_modules/has-duplicates/package.json +0 -32
- package/native/token-counter/node_modules/has-duplicates/readme.md +0 -23
- package/native/token-counter/node_modules/has-duplicates/test.js +0 -30
- package/native/token-counter/node_modules/if-else-throw/index.js +0 -8
- package/native/token-counter/node_modules/if-else-throw/license.txt +0 -21
- package/native/token-counter/node_modules/if-else-throw/package.json +0 -37
- package/native/token-counter/node_modules/if-else-throw/readme.md +0 -32
- package/native/token-counter/node_modules/is-array-of-length/index.js +0 -7
- package/native/token-counter/node_modules/is-array-of-length/license.txt +0 -21
- package/native/token-counter/node_modules/is-array-of-length/package.json +0 -42
- package/native/token-counter/node_modules/is-array-of-length/readme.md +0 -41
- package/native/token-counter/node_modules/is-class-of/index.js +0 -7
- package/native/token-counter/node_modules/is-class-of/license.txt +0 -21
- package/native/token-counter/node_modules/is-class-of/package.json +0 -35
- package/native/token-counter/node_modules/is-class-of/readme.md +0 -57
- package/native/token-counter/node_modules/is-global-object/index.js +0 -6
- package/native/token-counter/node_modules/is-global-object/license.txt +0 -21
- package/native/token-counter/node_modules/is-global-object/package.json +0 -34
- package/native/token-counter/node_modules/is-global-object/readme.md +0 -22
- package/native/token-counter/node_modules/is-instance-of/index.js +0 -28
- package/native/token-counter/node_modules/is-instance-of/license.txt +0 -21
- package/native/token-counter/node_modules/is-instance-of/package.json +0 -44
- package/native/token-counter/node_modules/is-instance-of/readme.md +0 -55
- package/native/token-counter/node_modules/is-iterable/index.js +0 -5
- package/native/token-counter/node_modules/is-iterable/license +0 -21
- package/native/token-counter/node_modules/is-iterable/package.json +0 -30
- package/native/token-counter/node_modules/is-iterable/readme.md +0 -23
- package/native/token-counter/node_modules/is-nil/LICENSE +0 -21
- package/native/token-counter/node_modules/is-nil/README.md +0 -47
- package/native/token-counter/node_modules/is-nil/index.js +0 -6
- package/native/token-counter/node_modules/is-nil/package.json +0 -46
- package/native/token-counter/node_modules/is-obj/index.js +0 -5
- package/native/token-counter/node_modules/is-obj/license +0 -21
- package/native/token-counter/node_modules/is-obj/package.json +0 -33
- package/native/token-counter/node_modules/is-obj/readme.md +0 -34
- package/native/token-counter/node_modules/is-object/.eslintignore +0 -1
- package/native/token-counter/node_modules/is-object/.eslintrc +0 -5
- package/native/token-counter/node_modules/is-object/.nycrc +0 -13
- package/native/token-counter/node_modules/is-object/.testem.json +0 -14
- package/native/token-counter/node_modules/is-object/CHANGELOG.md +0 -121
- package/native/token-counter/node_modules/is-object/LICENSE +0 -19
- package/native/token-counter/node_modules/is-object/README.md +0 -48
- package/native/token-counter/node_modules/is-object/index.js +0 -5
- package/native/token-counter/node_modules/is-object/package.json +0 -78
- package/native/token-counter/node_modules/is-object/test/index.js +0 -44
- package/native/token-counter/node_modules/is-plain-object/LICENSE +0 -21
- package/native/token-counter/node_modules/is-plain-object/README.md +0 -104
- package/native/token-counter/node_modules/is-plain-object/index.d.ts +0 -5
- package/native/token-counter/node_modules/is-plain-object/index.js +0 -37
- package/native/token-counter/node_modules/is-plain-object/package.json +0 -79
- package/native/token-counter/node_modules/isobject/LICENSE +0 -21
- package/native/token-counter/node_modules/isobject/README.md +0 -122
- package/native/token-counter/node_modules/isobject/index.d.ts +0 -5
- package/native/token-counter/node_modules/isobject/index.js +0 -12
- package/native/token-counter/node_modules/isobject/package.json +0 -74
- package/native/token-counter/node_modules/lodash.set/LICENSE +0 -47
- package/native/token-counter/node_modules/lodash.set/README.md +0 -18
- package/native/token-counter/node_modules/lodash.set/index.js +0 -990
- package/native/token-counter/node_modules/lodash.set/package.json +0 -17
- package/native/token-counter/node_modules/longest-first/index.js +0 -3
- package/native/token-counter/node_modules/longest-first/license.txt +0 -21
- package/native/token-counter/node_modules/longest-first/package.json +0 -36
- package/native/token-counter/node_modules/longest-first/readme.md +0 -29
- package/native/token-counter/node_modules/m-o/index.js +0 -27
- package/native/token-counter/node_modules/m-o/license.txt +0 -21
- package/native/token-counter/node_modules/m-o/node_modules/new-object/index.js +0 -23
- package/native/token-counter/node_modules/m-o/node_modules/new-object/license.txt +0 -21
- package/native/token-counter/node_modules/m-o/node_modules/new-object/package.json +0 -40
- package/native/token-counter/node_modules/m-o/node_modules/new-object/readme.md +0 -55
- package/native/token-counter/node_modules/m-o/package.json +0 -45
- package/native/token-counter/node_modules/m-o/readme.md +0 -87
- package/native/token-counter/node_modules/map-iter/index.js +0 -6
- package/native/token-counter/node_modules/map-iter/license.txt +0 -21
- package/native/token-counter/node_modules/map-iter/package.json +0 -40
- package/native/token-counter/node_modules/map-iter/readme.md +0 -46
- package/native/token-counter/node_modules/new-object/index.js +0 -5
- package/native/token-counter/node_modules/new-object/license.txt +0 -21
- package/native/token-counter/node_modules/new-object/package.json +0 -49
- package/native/token-counter/node_modules/new-object/readme.md +0 -145
- package/native/token-counter/node_modules/ofn/index.js +0 -22
- package/native/token-counter/node_modules/ofn/license.txt +0 -21
- package/native/token-counter/node_modules/ofn/package.json +0 -40
- package/native/token-counter/node_modules/ofn/readme.md +0 -63
- package/native/token-counter/node_modules/otherwise/index.js +0 -11
- package/native/token-counter/node_modules/otherwise/license.txt +0 -21
- package/native/token-counter/node_modules/otherwise/package.json +0 -38
- package/native/token-counter/node_modules/otherwise/readme.md +0 -29
- package/native/token-counter/node_modules/parser-factory/index.js +0 -138
- package/native/token-counter/node_modules/parser-factory/license.txt +0 -21
- package/native/token-counter/node_modules/parser-factory/node_modules/arrify/index.d.ts +0 -38
- package/native/token-counter/node_modules/parser-factory/node_modules/arrify/index.js +0 -23
- package/native/token-counter/node_modules/parser-factory/node_modules/arrify/license +0 -9
- package/native/token-counter/node_modules/parser-factory/node_modules/arrify/package.json +0 -35
- package/native/token-counter/node_modules/parser-factory/node_modules/arrify/readme.md +0 -39
- package/native/token-counter/node_modules/parser-factory/package.json +0 -38
- package/native/token-counter/node_modules/parser-factory/readme.md +0 -15
- package/native/token-counter/node_modules/pfn/index.js +0 -5
- package/native/token-counter/node_modules/pfn/license.txt +0 -21
- package/native/token-counter/node_modules/pfn/package.json +0 -41
- package/native/token-counter/node_modules/pfn/readme.md +0 -111
- package/native/token-counter/node_modules/pfn/strict.js +0 -8
- package/native/token-counter/node_modules/plainify/index.js +0 -5
- package/native/token-counter/node_modules/plainify/license.txt +0 -21
- package/native/token-counter/node_modules/plainify/package.json +0 -36
- package/native/token-counter/node_modules/plainify/readme.md +0 -47
- package/native/token-counter/node_modules/possible-function/changelog.md +0 -7
- package/native/token-counter/node_modules/possible-function/index.js +0 -43
- package/native/token-counter/node_modules/possible-function/license.txt +0 -21
- package/native/token-counter/node_modules/possible-function/package.json +0 -34
- package/native/token-counter/node_modules/possible-function/readme.md +0 -77
- package/native/token-counter/node_modules/possible-function/test.js +0 -32
- package/native/token-counter/node_modules/qfn/index.js +0 -11
- package/native/token-counter/node_modules/qfn/license.txt +0 -21
- package/native/token-counter/node_modules/qfn/package.json +0 -40
- package/native/token-counter/node_modules/qfn/readme.md +0 -45
- package/native/token-counter/node_modules/roadblock/index.js +0 -3
- package/native/token-counter/node_modules/roadblock/license.txt +0 -21
- package/native/token-counter/node_modules/roadblock/package.json +0 -40
- package/native/token-counter/node_modules/roadblock/readme.md +0 -59
- package/native/token-counter/node_modules/round-to/index.d.ts +0 -56
- package/native/token-counter/node_modules/round-to/index.js +0 -37
- package/native/token-counter/node_modules/round-to/license +0 -9
- package/native/token-counter/node_modules/round-to/package.json +0 -38
- package/native/token-counter/node_modules/round-to/readme.md +0 -71
- package/native/token-counter/node_modules/rtrim-array/index.js +0 -10
- package/native/token-counter/node_modules/rtrim-array/license.txt +0 -21
- package/native/token-counter/node_modules/rtrim-array/package.json +0 -41
- package/native/token-counter/node_modules/rtrim-array/readme.md +0 -75
- package/native/token-counter/node_modules/sbo/index.js +0 -25
- package/native/token-counter/node_modules/sbo/license.txt +0 -21
- package/native/token-counter/node_modules/sbo/package.json +0 -50
- package/native/token-counter/node_modules/sbo/readme.md +0 -105
- package/native/token-counter/node_modules/sorp/index.js +0 -3
- package/native/token-counter/node_modules/sorp/license.txt +0 -21
- package/native/token-counter/node_modules/sorp/package.json +0 -34
- package/native/token-counter/node_modules/sorp/readme.md +0 -25
- package/native/token-counter/node_modules/trim-call/index.js +0 -6
- package/native/token-counter/node_modules/trim-call/license.txt +0 -21
- package/native/token-counter/node_modules/trim-call/package.json +0 -40
- package/native/token-counter/node_modules/trim-call/readme.md +0 -80
- package/native/token-counter/node_modules/type-error/LICENSE +0 -21
- package/native/token-counter/node_modules/type-error/README.md +0 -24
- package/native/token-counter/node_modules/type-error/index.js +0 -35
- package/native/token-counter/node_modules/type-error/package.json +0 -11
- package/native/token-counter/node_modules/vfn/index.js +0 -21
- package/native/token-counter/node_modules/vfn/license.txt +0 -21
- package/native/token-counter/node_modules/vfn/package.json +0 -40
- package/native/token-counter/node_modules/vfn/readme.md +0 -81
- package/native/token-counter/node_modules/wfn/index.js +0 -43
- package/native/token-counter/node_modules/wfn/license.txt +0 -21
- package/native/token-counter/node_modules/wfn/package.json +0 -38
- package/native/token-counter/node_modules/wfn/readme.md +0 -81
- package/native/token-counter/package-lock.json +0 -578
- package/native/token-counter/package.json +0 -21
- package/native/token-counter/token-counter.linux-x64-gnu.node +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "lodash.set",
|
|
3
|
-
"version": "4.3.2",
|
|
4
|
-
"description": "The lodash method `_.set` exported as a module.",
|
|
5
|
-
"homepage": "https://lodash.com/",
|
|
6
|
-
"icon": "https://lodash.com/icon.svg",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"keywords": "lodash-modularized, set",
|
|
9
|
-
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
|
10
|
-
"contributors": [
|
|
11
|
-
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
|
12
|
-
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
|
13
|
-
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
|
14
|
-
],
|
|
15
|
-
"repository": "lodash/lodash",
|
|
16
|
-
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright ©2018 John Lamansky
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "longest-first",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Sorts items in descending order of length.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"sort",
|
|
7
|
-
"array",
|
|
8
|
-
"length",
|
|
9
|
-
"bind operator"
|
|
10
|
-
],
|
|
11
|
-
"author": "John Lamansky",
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"homepage": "https://github.com/lamansky/longest-first",
|
|
14
|
-
"repository": "lamansky/longest-first",
|
|
15
|
-
"main": "index.js",
|
|
16
|
-
"files": [],
|
|
17
|
-
"engines": {
|
|
18
|
-
"node": ">=6.0.0"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"sbo": "^1.0.0"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"eslint-config-lamansky": "^1.0.0",
|
|
25
|
-
"mocha": "^5.0.0"
|
|
26
|
-
},
|
|
27
|
-
"scripts": {
|
|
28
|
-
"test": "mocha"
|
|
29
|
-
},
|
|
30
|
-
"eslintConfig": {
|
|
31
|
-
"extends": "lamansky",
|
|
32
|
-
"env": {
|
|
33
|
-
"mocha": true
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# longest-first
|
|
2
|
-
|
|
3
|
-
Sorts items in descending order of length.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Requires [Node.js](https://nodejs.org/) 6.0.0 or above.
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm i longest-first
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## API
|
|
14
|
-
|
|
15
|
-
The module exports a single function.
|
|
16
|
-
|
|
17
|
-
* **Parameter**: `items` (iterable): Values that should be sorted by their `length` property. (The original iterable is not modified.)
|
|
18
|
-
* **Return Value**: Array
|
|
19
|
-
|
|
20
|
-
## Example
|
|
21
|
-
|
|
22
|
-
```javascript
|
|
23
|
-
const longestFirst = require('longest-first')
|
|
24
|
-
|
|
25
|
-
longestFirst(['one', 'two', 'three']) // ['three', 'one', 'two']
|
|
26
|
-
|
|
27
|
-
// Supports the bind operator
|
|
28
|
-
['test', 'example']::longestFirst() // ['example', 'test']
|
|
29
|
-
```
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const getOwnProperty = require('get-own-property')
|
|
4
|
-
const ifElseThrow = require('if-else-throw')
|
|
5
|
-
const isObj = require('is-object')
|
|
6
|
-
const newObject = require('new-object')
|
|
7
|
-
|
|
8
|
-
const check = mo => ifElseThrow(isObj(mo), mo, new TypeError('m-o requires a Map or an Object'))
|
|
9
|
-
const isMap = mo => check(mo) instanceof Map
|
|
10
|
-
|
|
11
|
-
const has = (mo, key) => isMap(mo) ? mo.has(key) : Object.prototype.hasOwnProperty.call(mo, key)
|
|
12
|
-
const hasIn = (mo, key) => isMap(mo) ? mo.has(key) : key in mo
|
|
13
|
-
const get = (mo, key) => isMap(mo) ? mo.get(key) : getOwnProperty(mo, key)
|
|
14
|
-
const getIn = (mo, key) => isMap(mo) ? mo.get(key) : mo[key]
|
|
15
|
-
const set = (mo, key, val) => { if (isMap(mo)) mo.set(key, val); else mo[key] = val; return mo }
|
|
16
|
-
const edit = (mo, key, editor) => set(mo, key, editor(get(mo, key)))
|
|
17
|
-
const del = (mo, key) => isMap(mo) ? mo.delete(key) : has(mo, key) ? delete mo[key] : false
|
|
18
|
-
const construct = (Cls, entries = []) => Cls === Object ? newObject(entries) : new Cls(entries)
|
|
19
|
-
const reconstruct = (mo, entries = []) => isMap(mo) ? new (mo.constructor)(entries) : newObject(entries)
|
|
20
|
-
const entries = mo => isMap(mo) ? mo.entries() : Object.entries(mo)[Symbol.iterator]()
|
|
21
|
-
const entriesArray = mo => isMap(mo) ? Array.from(mo.entries()) : Object.entries(mo)
|
|
22
|
-
const keys = mo => isMap(mo) ? mo.keys() : Object.keys(mo)[Symbol.iterator]()
|
|
23
|
-
const keysArray = mo => isMap(mo) ? Array.from(mo.keys()) : Object.keys(mo)
|
|
24
|
-
const values = mo => isMap(mo) ? mo.values() : Object.values(mo)[Symbol.iterator]()
|
|
25
|
-
const valuesArray = mo => isMap(mo) ? Array.from(mo.values()) : Object.values(mo)
|
|
26
|
-
|
|
27
|
-
module.exports = {has, hasIn, get, getIn, set, edit, delete: del, construct, reconstruct, entries, entriesArray, keys, keysArray, values, valuesArray}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright ©2017–2018 John Lamansky
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const errate = require('errate')
|
|
4
|
-
|
|
5
|
-
module.exports = function newObject (entries, {throwIfEquivKeys: err} = {}) {
|
|
6
|
-
if (err === true) {
|
|
7
|
-
err = new TypeError('Multiple keys have equivalent string representations and would overwrite each other in the generated object.')
|
|
8
|
-
} else if (err) {
|
|
9
|
-
err = errate(err, TypeError, {forceClass: false})
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const obj = {}
|
|
13
|
-
if (entries) {
|
|
14
|
-
for (const entry of entries) {
|
|
15
|
-
if (!entry || typeof entry !== 'object') {
|
|
16
|
-
throw new TypeError('Iterator value ' + String(entry) + ' is not an entry object')
|
|
17
|
-
}
|
|
18
|
-
if (err && (entry[0] in obj)) throw err
|
|
19
|
-
obj[entry[0]] = entry[1]
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return obj
|
|
23
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright ©2017–2018 Fr. John Lamansky
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "new-object",
|
|
3
|
-
"version": "3.1.0",
|
|
4
|
-
"description": "Creates an object from an array of entries, in imitation of the Map constructor.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"new",
|
|
7
|
-
"object",
|
|
8
|
-
"constructor",
|
|
9
|
-
"entries",
|
|
10
|
-
"key",
|
|
11
|
-
"value"
|
|
12
|
-
],
|
|
13
|
-
"author": {
|
|
14
|
-
"name": "Fr. John Lamansky",
|
|
15
|
-
"url": "lamansky.com"
|
|
16
|
-
},
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"repository": "lamansky/new-object",
|
|
19
|
-
"main": "index.js",
|
|
20
|
-
"files": [],
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=6.0.0"
|
|
23
|
-
},
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"errate": "^1.1.0"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"eslint-config-lamansky": "^1.0.0",
|
|
29
|
-
"mocha": "^5.2.0"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"test": "mocha"
|
|
33
|
-
},
|
|
34
|
-
"eslintConfig": {
|
|
35
|
-
"extends": "lamansky",
|
|
36
|
-
"env": {
|
|
37
|
-
"mocha": true
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# new-object
|
|
2
|
-
|
|
3
|
-
Creates an object from an array of entries.
|
|
4
|
-
|
|
5
|
-
The [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) constructor lets you specify initial keys and values via an `iterable` collection (e.g. an array) of key-value pairs, whereas the `Object` constructor does not. This simple module fills that gap, approximating [the ECMA-defined behavior for the Map constructor](https://tc39.github.io/ecma262/#sec-map-iterable) but for Objects.
|
|
6
|
-
|
|
7
|
-
In short, you can think of the `new-object` module as doing the opposite of [`Object.entries()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries):
|
|
8
|
-
|
|
9
|
-
```JavaScript
|
|
10
|
-
newObject(Object.entries({a: 1, b: 2})) // {a: 1, b: 2}
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Remember that, unlike Maps, Objects can only use strings and symbols as keys.
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
Requires [Node.js](https://nodejs.org/) 6.0.0 or above.
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm i new-object
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## API
|
|
24
|
-
|
|
25
|
-
The module exports a single function.
|
|
26
|
-
|
|
27
|
-
### Parameters
|
|
28
|
-
|
|
29
|
-
1. `entries` (iterable): The key-value pairs for the object.
|
|
30
|
-
2. Optional: Object argument:
|
|
31
|
-
* `throwIfEquivKeys` (Error, string, or boolean): Set this to throw an error if `entries` contains keys that would be considered duplicates in the context of an object. For example, a Map can have keys that are objects, but those keys will all likely evaluate to `[object Object]` if made keys in an object. Similarly, a Map can have distinct `1` (number) and `'1'` (string) keys, but these would be considered the same in an object context.
|
|
32
|
-
|
|
33
|
-
### Return Value
|
|
34
|
-
|
|
35
|
-
Returns a plain object containing `entries`.
|
|
36
|
-
|
|
37
|
-
## Example
|
|
38
|
-
|
|
39
|
-
```javascript
|
|
40
|
-
const newObject = require('new-object')
|
|
41
|
-
|
|
42
|
-
const entries = [['a', 1], ['b', 2]]
|
|
43
|
-
|
|
44
|
-
// What was possible for a Map...
|
|
45
|
-
const map = new Map(entries)
|
|
46
|
-
map.get('a') // 1
|
|
47
|
-
|
|
48
|
-
// ...is now also possible for an Object:
|
|
49
|
-
const obj = newObject(entries)
|
|
50
|
-
obj.a // 1
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Related
|
|
54
|
-
|
|
55
|
-
* [construct-map](https://github.com/lamansky/construct-map): Like this module, except it can also construct Maps and other key/value collections.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "m-o",
|
|
3
|
-
"version": "2.2.0",
|
|
4
|
-
"description": "Functions that work on both Maps and Objects: has, get, set, delete, entries, keys, values, etc.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"Map",
|
|
7
|
-
"object",
|
|
8
|
-
"has",
|
|
9
|
-
"get",
|
|
10
|
-
"set",
|
|
11
|
-
"delete",
|
|
12
|
-
"entries",
|
|
13
|
-
"keys",
|
|
14
|
-
"values",
|
|
15
|
-
"construct"
|
|
16
|
-
],
|
|
17
|
-
"author": "John Lamansky",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"homepage": "https://github.com/lamansky/m-o",
|
|
20
|
-
"repository": "lamansky/m-o",
|
|
21
|
-
"main": "index.js",
|
|
22
|
-
"files": [],
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=7.0.0"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"get-own-property": "^1.0.0",
|
|
28
|
-
"if-else-throw": "^1.0.0",
|
|
29
|
-
"is-object": "^1.0.1",
|
|
30
|
-
"new-object": "^3.0.0"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"eslint-config-lamansky": "^1.0.0",
|
|
34
|
-
"mocha": "^5.0.0"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"test": "mocha"
|
|
38
|
-
},
|
|
39
|
-
"eslintConfig": {
|
|
40
|
-
"extends": "lamansky",
|
|
41
|
-
"env": {
|
|
42
|
-
"mocha": true
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# m-o
|
|
2
|
-
|
|
3
|
-
A collection of functions that work on both Maps and Objects, letting you write code that can handle either, if that’s your M.O.
|
|
4
|
-
|
|
5
|
-
The functions are: `has`, `hasIn`, `get`, `getIn`, `set`, `edit`, `delete`, `construct`, `reconstruct`, `entries`, `entriesArray`, `keys`, `keysArray`, `values`, and `valuesArray`.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
Requires [Node.js](https://nodejs.org/) 7.0.0 or above.
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install m-o --save
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
The module exports an object with multiple methods.
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
Nota Bene: Maps can accept keys of any type, but Objects cannot. If you expect your code to work with both, then you should only use strings/numbers/symbols as keys.
|
|
20
|
-
|
|
21
|
-
```javascript
|
|
22
|
-
const mo = require('m-o')
|
|
23
|
-
|
|
24
|
-
const map = new Map()
|
|
25
|
-
const obj = {}
|
|
26
|
-
|
|
27
|
-
// Set
|
|
28
|
-
mo.set(map, 'hello', 'world')
|
|
29
|
-
mo.set(obj, 'hello', 'world')
|
|
30
|
-
|
|
31
|
-
// Has
|
|
32
|
-
mo.has(map, 'hello') // true
|
|
33
|
-
mo.has(obj, 'hello') // true
|
|
34
|
-
|
|
35
|
-
// Get
|
|
36
|
-
mo.get(map, 'hello') // 'world'
|
|
37
|
-
mo.get(obj, 'hello') // 'world'
|
|
38
|
-
|
|
39
|
-
// vs. the normal way:
|
|
40
|
-
map.get('hello') // 'world'
|
|
41
|
-
obj.hello // 'world'
|
|
42
|
-
|
|
43
|
-
// Edit
|
|
44
|
-
mo.edit(map, 'hello', value => value + '!')
|
|
45
|
-
mo.edit(obj, 'hello', value => value + '!')
|
|
46
|
-
mo.get(map, 'hello') // 'world!'
|
|
47
|
-
mo.get(obj, 'hello') // 'world!'
|
|
48
|
-
|
|
49
|
-
// Delete
|
|
50
|
-
mo.delete(map, 'hello') // true
|
|
51
|
-
mo.delete(obj, 'hello') // true
|
|
52
|
-
mo.delete(map, 'nonexistent') // false
|
|
53
|
-
mo.delete(obj, 'nonexistent') // false
|
|
54
|
-
|
|
55
|
-
// Entries
|
|
56
|
-
mo.entries(map) // MapIterator
|
|
57
|
-
mo.entries(obj) // ArrayIterator
|
|
58
|
-
|
|
59
|
-
// Construct a Map or an Object, depending on the class provided
|
|
60
|
-
const entries = [['hello', 'world']]
|
|
61
|
-
mo.construct(Object, entries) // {hello: 'world'}
|
|
62
|
-
mo.construct(Map, entries) // Map
|
|
63
|
-
class XMap extends Map {}
|
|
64
|
-
mo.construct(XMap, entries) // XMap
|
|
65
|
-
|
|
66
|
-
// Construct a new Map or Object having the same class as an existing object
|
|
67
|
-
mo.reconstruct(obj, entries) // {hello: 'world'}
|
|
68
|
-
mo.reconstruct(map, entries) // Map
|
|
69
|
-
mo.reconstruct(new XMap(), entries) // XMap
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Entries, Keys, and Values
|
|
73
|
-
|
|
74
|
-
The `Map` prototype has `entries()`, `keys()`, and `values()` methods which return iterators, whereas the global functions `Object.entries()`, `Object.keys()`, and `Object.values()` return arrays. The `m-o` module lets you remain consistent regardless of which type you’re dealing with. Use the `entries()`, `keys()`, and `values()` methods if you want iterators, and use `entriesArray()`, `keysArray()`, and `valuesArray()` if you want arrays.
|
|
75
|
-
|
|
76
|
-
### Accessing Prototype Properties
|
|
77
|
-
|
|
78
|
-
By default, `has` and `get` treat an object like a dictionary and therefore only access its own properties. If you want to access object prototype properties as well, use the `hasIn` or `getIn` methods instead. (With Maps, behavior is the same regardless of which set of methods you use.)
|
|
79
|
-
|
|
80
|
-
```javascript
|
|
81
|
-
typeof obj.toString // 'function'
|
|
82
|
-
typeof mo.get(obj, 'toString') // 'undefined'
|
|
83
|
-
typeof mo.getIn(obj, 'toString') // 'function'
|
|
84
|
-
|
|
85
|
-
mo.has(obj, 'toString') // false
|
|
86
|
-
mo.hasIn(obj, 'toString') // true
|
|
87
|
-
```
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright ©2018 Fr. John Lamansky
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "map-iter",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Applies a callback to each value outputted by an iterable.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"iterable",
|
|
7
|
-
"map",
|
|
8
|
-
"values",
|
|
9
|
-
"callback"
|
|
10
|
-
],
|
|
11
|
-
"author": {
|
|
12
|
-
"name": "Fr. John Lamansky",
|
|
13
|
-
"url": "lamansky.com"
|
|
14
|
-
},
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"homepage": "https://github.com/lamansky/map-iter",
|
|
17
|
-
"repository": "lamansky/map-iter",
|
|
18
|
-
"main": "index.js",
|
|
19
|
-
"files": [],
|
|
20
|
-
"engines": {
|
|
21
|
-
"node": ">=6.0.0"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"sbo": "^1.1.0"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"eslint-config-lamansky": "^1.0.0",
|
|
28
|
-
"is-iterable-with": "^1.0.0",
|
|
29
|
-
"mocha": "^5.2.0"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"test": "mocha"
|
|
33
|
-
},
|
|
34
|
-
"eslintConfig": {
|
|
35
|
-
"extends": "lamansky",
|
|
36
|
-
"env": {
|
|
37
|
-
"mocha": true
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# map-iter
|
|
2
|
-
|
|
3
|
-
Applies a callback to each value outputted by an iterable.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
Requires [Node.js](https://nodejs.org/) 6.0.0 or above.
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm i map-iter
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## API
|
|
14
|
-
|
|
15
|
-
The module exports a single function.
|
|
16
|
-
|
|
17
|
-
### Parameters
|
|
18
|
-
|
|
19
|
-
1. `iter` (iterable)
|
|
20
|
-
2. `cb` (function): The callback that, for each value iterated by `iter`, will be given two arguments: the value iterated, and an incrementing index counter that starts at zero. The return value of `cb` will be iterated in lieu of the original value.
|
|
21
|
-
|
|
22
|
-
### Return Value
|
|
23
|
-
|
|
24
|
-
An iterator that outputs the return values of `cb`.
|
|
25
|
-
|
|
26
|
-
## Example
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
const map = require('map-iter')
|
|
30
|
-
|
|
31
|
-
const iterator = map([1, 2, 3], x => x * 2)
|
|
32
|
-
iterator.next().value // 2
|
|
33
|
-
iterator.next().value // 4
|
|
34
|
-
iterator.next().value // 6
|
|
35
|
-
iterator.next().done // true
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Related
|
|
39
|
-
|
|
40
|
-
* [filter-iter](https://github.com/lamansky/filter-iter): Filters an iterable object so that it only yields values which pass a test function.
|
|
41
|
-
* [partition-iterable](https://github.com/lamansky/partition-iterable): Divides iterated values into those that match a filter and those that don’t.
|
|
42
|
-
* [reduce-iterable](https://github.com/lamansky/reduce-iterable): Applies a function to iterated values to reduce them to a single value.
|
|
43
|
-
* [unique-iterable](https://github.com/lamansky/unique-iterable): Filters an iterable object so it doesn’t yield the same value more than once.
|
|
44
|
-
* [unique-iterable-by](https://github.com/lamansky/unique-iterable-by): Filters yielded values by testing uniqueness with an index, key, or callback.
|
|
45
|
-
* [@lamansky/every](https://github.com/lamansky/every): Array.prototype.every() for iterables.
|
|
46
|
-
* [@lamansky/some](https://github.com/lamansky/some): Array.prototype.some() for iterables.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright ©2017–2019 Fr. John Lamansky
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "new-object",
|
|
3
|
-
"version": "4.0.0",
|
|
4
|
-
"description": "Creates an Object from a collection of key-value pairs or key-descriptor pairs.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"new",
|
|
7
|
-
"object",
|
|
8
|
-
"constructor",
|
|
9
|
-
"entries",
|
|
10
|
-
"key",
|
|
11
|
-
"value",
|
|
12
|
-
"define",
|
|
13
|
-
"property",
|
|
14
|
-
"properties",
|
|
15
|
-
"descriptor",
|
|
16
|
-
"getter",
|
|
17
|
-
"setter",
|
|
18
|
-
"configurable",
|
|
19
|
-
"enumerable",
|
|
20
|
-
"writable"
|
|
21
|
-
],
|
|
22
|
-
"author": {
|
|
23
|
-
"name": "Fr. John Lamansky",
|
|
24
|
-
"url": "lamansky.com"
|
|
25
|
-
},
|
|
26
|
-
"license": "MIT",
|
|
27
|
-
"repository": "lamansky/new-object",
|
|
28
|
-
"main": "index.js",
|
|
29
|
-
"files": [],
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=8.3.0"
|
|
32
|
-
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"def-props": "^1.0.0"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"eslint-config-lamansky": "^2.0.0",
|
|
38
|
-
"mocha": "^6.2.2"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"test": "mocha"
|
|
42
|
-
},
|
|
43
|
-
"eslintConfig": {
|
|
44
|
-
"extends": "lamansky",
|
|
45
|
-
"env": {
|
|
46
|
-
"mocha": true
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|