cdk-common 2.0.1040 → 2.0.1041
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/.jsii +8 -2
- package/API.md +6 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +2 -1
- package/lib/managed-policies.js +2 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -7
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -7
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +25 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +5 -0
- package/node_modules/call-bound/index.js +18 -0
- package/node_modules/call-bound/package.json +98 -0
- package/node_modules/call-bound/test/index.js +54 -0
- package/node_modules/call-bound/tsconfig.json +9 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +16 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +56 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +3 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/package.json +79 -0
- package/node_modules/es-object-atoms/test/index.js +28 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +9 -0
- package/node_modules/get-intrinsic/index.js +16 -3
- package/node_modules/get-intrinsic/package.json +6 -4
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +16 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +49 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +85 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +183 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/side-channel/.eslintrc +1 -0
- package/node_modules/side-channel/CHANGELOG.md +15 -0
- package/node_modules/side-channel/README.md +60 -1
- package/node_modules/side-channel/index.d.ts +9 -22
- package/node_modules/side-channel/index.js +20 -106
- package/node_modules/side-channel/package.json +20 -19
- package/node_modules/side-channel/test/index.js +76 -55
- package/node_modules/side-channel/tsconfig.json +2 -43
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 11 Dec 2024 09:35:14 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
15
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [
|
|
15
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.10.
|
|
3
|
+
"version": "22.10.2",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -170,11 +170,6 @@
|
|
|
170
170
|
"githubUsername": "victorperin",
|
|
171
171
|
"url": "https://github.com/victorperin"
|
|
172
172
|
},
|
|
173
|
-
{
|
|
174
|
-
"name": "Yongsheng Zhang",
|
|
175
|
-
"githubUsername": "ZYSzys",
|
|
176
|
-
"url": "https://github.com/ZYSzys"
|
|
177
|
-
},
|
|
178
173
|
{
|
|
179
174
|
"name": "NodeJS Contributors",
|
|
180
175
|
"githubUsername": "NodeJS",
|
|
@@ -220,6 +215,6 @@
|
|
|
220
215
|
"undici-types": "~6.20.0"
|
|
221
216
|
},
|
|
222
217
|
"peerDependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
218
|
+
"typesPublisherContentHash": "1c1003be2fa8d4f16936ac129ec72142249d4a14af58831bef4147ca7035833b",
|
|
224
219
|
"typeScriptVersion": "5.0"
|
|
225
220
|
}
|
|
@@ -8,8 +8,8 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 11 Dec 2024 09:35:14 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
15
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [
|
|
15
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "22.10.
|
|
3
|
+
"version": "22.10.2",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -170,11 +170,6 @@
|
|
|
170
170
|
"githubUsername": "victorperin",
|
|
171
171
|
"url": "https://github.com/victorperin"
|
|
172
172
|
},
|
|
173
|
-
{
|
|
174
|
-
"name": "Yongsheng Zhang",
|
|
175
|
-
"githubUsername": "ZYSzys",
|
|
176
|
-
"url": "https://github.com/ZYSzys"
|
|
177
|
-
},
|
|
178
173
|
{
|
|
179
174
|
"name": "NodeJS Contributors",
|
|
180
175
|
"githubUsername": "NodeJS",
|
|
@@ -220,6 +215,6 @@
|
|
|
220
215
|
"undici-types": "~6.20.0"
|
|
221
216
|
},
|
|
222
217
|
"peerDependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
218
|
+
"typesPublisherContentHash": "1c1003be2fa8d4f16936ac129ec72142249d4a14af58831bef4147ca7035833b",
|
|
224
219
|
"typeScriptVersion": "5.0"
|
|
225
220
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/call-bound
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v1.0.2](https://github.com/ljharb/call-bound/compare/v1.0.1...v1.0.2) - 2024-12-10
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `gopd` [`e6a5ffe`](https://github.com/ljharb/call-bound/commit/e6a5ffe849368fe4f74dfd6cdeca1b9baa39e8d5)
|
|
13
|
+
- [Deps] update `call-bind`, `get-intrinsic` [`2aeb5b5`](https://github.com/ljharb/call-bound/commit/2aeb5b521dc2b2683d1345c753ea1161de2d1c14)
|
|
14
|
+
- [types] improve return type [`1a0c9fe`](https://github.com/ljharb/call-bound/commit/1a0c9fe3114471e7ca1f57d104e2efe713bb4871)
|
|
15
|
+
|
|
16
|
+
## v1.0.1 - 2024-12-05
|
|
17
|
+
|
|
18
|
+
### Commits
|
|
19
|
+
|
|
20
|
+
- Initial implementation, tests, readme, types [`6d94121`](https://github.com/ljharb/call-bound/commit/6d94121a9243602e506334069f7a03189fe3363d)
|
|
21
|
+
- Initial commit [`0eae867`](https://github.com/ljharb/call-bound/commit/0eae867334ea025c33e6e91cdecfc9df96680cf9)
|
|
22
|
+
- npm init [`71b2479`](https://github.com/ljharb/call-bound/commit/71b2479c6723e0b7d91a6b663613067e98b7b275)
|
|
23
|
+
- Only apps should have lockfiles [`c3754a9`](https://github.com/ljharb/call-bound/commit/c3754a949b7f9132b47e2d18c1729889736741eb)
|
|
24
|
+
- [actions] skip `npm ls` in node < 10 [`74275a5`](https://github.com/ljharb/call-bound/commit/74275a5186b8caf6309b6b97472bdcb0df4683a8)
|
|
25
|
+
- [Dev Deps] add missing peer dep [`1354de8`](https://github.com/ljharb/call-bound/commit/1354de8679413e4ae9c523d85f76fa7a5e032d97)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Jordan Harband
|
|
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.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# call-bound <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![dependency status][deps-svg]][deps-url]
|
|
6
|
+
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
|
7
|
+
[![License][license-image]][license-url]
|
|
8
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
9
|
+
|
|
10
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
11
|
+
|
|
12
|
+
Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
|
|
13
|
+
|
|
14
|
+
## Getting started
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install --save call-bound
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage/Examples
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
const assert = require('assert');
|
|
24
|
+
const callBound = require('call-bind/callBound');
|
|
25
|
+
|
|
26
|
+
const slice = callBound('Array.prototype.slice');
|
|
27
|
+
|
|
28
|
+
delete Function.prototype.call;
|
|
29
|
+
delete Function.prototype.bind;
|
|
30
|
+
delete Array.prototype.slice;
|
|
31
|
+
|
|
32
|
+
assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Tests
|
|
36
|
+
|
|
37
|
+
Clone the repo, `npm install`, and run `npm test`
|
|
38
|
+
|
|
39
|
+
[package-url]: https://npmjs.org/package/call-bound
|
|
40
|
+
[npm-version-svg]: https://versionbadg.es/ljharb/call-bound.svg
|
|
41
|
+
[deps-svg]: https://david-dm.org/ljharb/call-bound.svg
|
|
42
|
+
[deps-url]: https://david-dm.org/ljharb/call-bound
|
|
43
|
+
[dev-deps-svg]: https://david-dm.org/ljharb/call-bound/dev-status.svg
|
|
44
|
+
[dev-deps-url]: https://david-dm.org/ljharb/call-bound#info=devDependencies
|
|
45
|
+
[npm-badge-png]: https://nodei.co/npm/call-bound.png?downloads=true&stars=true
|
|
46
|
+
[license-image]: https://img.shields.io/npm/l/call-bound.svg
|
|
47
|
+
[license-url]: LICENSE
|
|
48
|
+
[downloads-image]: https://img.shields.io/npm/dm/call-bound.svg
|
|
49
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=call-bound
|
|
50
|
+
[codecov-image]: https://codecov.io/gh/ljharb/call-bound/branch/main/graphs/badge.svg
|
|
51
|
+
[codecov-url]: https://app.codecov.io/gh/ljharb/call-bound/
|
|
52
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bound
|
|
53
|
+
[actions-url]: https://github.com/ljharb/call-bound/actions
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
+
|
|
5
|
+
var callBind = require('call-bind');
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line no-extra-parens
|
|
8
|
+
var $indexOf = callBind(/** @type {typeof String.prototype.indexOf} */ (GetIntrinsic('String.prototype.indexOf')));
|
|
9
|
+
|
|
10
|
+
/** @type {import('.')} */
|
|
11
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
12
|
+
// eslint-disable-next-line no-extra-parens
|
|
13
|
+
var intrinsic = /** @type {Parameters<typeof callBind>[0]} */ (GetIntrinsic(name, !!allowMissing));
|
|
14
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
15
|
+
return callBind(intrinsic);
|
|
16
|
+
}
|
|
17
|
+
return intrinsic;
|
|
18
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "call-bound",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"prepack": "npmignore --auto --commentLines=auto",
|
|
12
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
13
|
+
"prepublishOnly": "safe-publish-latest",
|
|
14
|
+
"prelint": "evalmd README.md",
|
|
15
|
+
"lint": "eslint --ext=.js,.mjs .",
|
|
16
|
+
"postlint": "tsc -p . && attw -P",
|
|
17
|
+
"pretest": "npm run lint",
|
|
18
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
19
|
+
"test": "npm run tests-only",
|
|
20
|
+
"posttest": "npx npm@'>=10.2' audit --production",
|
|
21
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/ljharb/call-bound.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"javascript",
|
|
30
|
+
"ecmascript",
|
|
31
|
+
"es",
|
|
32
|
+
"js",
|
|
33
|
+
"callbind",
|
|
34
|
+
"callbound",
|
|
35
|
+
"call",
|
|
36
|
+
"bind",
|
|
37
|
+
"bound",
|
|
38
|
+
"call-bind",
|
|
39
|
+
"call-bound",
|
|
40
|
+
"function",
|
|
41
|
+
"es-abstract"
|
|
42
|
+
],
|
|
43
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
44
|
+
"funding": {
|
|
45
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
46
|
+
},
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/ljharb/call-bound/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/ljharb/call-bound#readme",
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"call-bind": "^1.0.8",
|
|
54
|
+
"get-intrinsic": "^1.2.5"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@arethetypeswrong/cli": "^0.17.1",
|
|
58
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
59
|
+
"@ljharb/tsconfig": "^0.2.2",
|
|
60
|
+
"@types/call-bind": "^1.0.5",
|
|
61
|
+
"@types/get-intrinsic": "^1.2.3",
|
|
62
|
+
"@types/tape": "^5.6.5",
|
|
63
|
+
"auto-changelog": "^2.5.0",
|
|
64
|
+
"encoding": "^0.1.13",
|
|
65
|
+
"es-value-fixtures": "^1.5.0",
|
|
66
|
+
"eslint": "=8.8.0",
|
|
67
|
+
"evalmd": "^0.0.19",
|
|
68
|
+
"for-each": "^0.3.3",
|
|
69
|
+
"gopd": "^1.2.0",
|
|
70
|
+
"has-strict-mode": "^1.0.1",
|
|
71
|
+
"in-publish": "^2.0.1",
|
|
72
|
+
"npmignore": "^0.3.1",
|
|
73
|
+
"nyc": "^10.3.2",
|
|
74
|
+
"object-inspect": "^1.13.3",
|
|
75
|
+
"safe-publish-latest": "^2.0.0",
|
|
76
|
+
"tape": "^5.9.0",
|
|
77
|
+
"typescript": "next"
|
|
78
|
+
},
|
|
79
|
+
"testling": {
|
|
80
|
+
"files": "test/index.js"
|
|
81
|
+
},
|
|
82
|
+
"auto-changelog": {
|
|
83
|
+
"output": "CHANGELOG.md",
|
|
84
|
+
"template": "keepachangelog",
|
|
85
|
+
"unreleased": false,
|
|
86
|
+
"commitLimit": false,
|
|
87
|
+
"backfillLimit": false,
|
|
88
|
+
"hideCredit": true
|
|
89
|
+
},
|
|
90
|
+
"publishConfig": {
|
|
91
|
+
"ignore": [
|
|
92
|
+
".github/workflows"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"engines": {
|
|
96
|
+
"node": ">= 0.4"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var callBound = require('../');
|
|
6
|
+
|
|
7
|
+
test('callBound', function (t) {
|
|
8
|
+
// static primitive
|
|
9
|
+
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
|
|
10
|
+
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
|
|
11
|
+
|
|
12
|
+
// static non-function object
|
|
13
|
+
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
|
|
14
|
+
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
|
|
15
|
+
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
|
|
16
|
+
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
|
|
17
|
+
|
|
18
|
+
// static function
|
|
19
|
+
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
|
|
20
|
+
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
|
|
21
|
+
|
|
22
|
+
// prototype primitive
|
|
23
|
+
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
|
|
24
|
+
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
|
|
25
|
+
|
|
26
|
+
// prototype function
|
|
27
|
+
t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself');
|
|
28
|
+
t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
|
|
29
|
+
t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
|
|
30
|
+
t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
|
|
31
|
+
|
|
32
|
+
t['throws'](
|
|
33
|
+
function () { callBound('does not exist'); },
|
|
34
|
+
SyntaxError,
|
|
35
|
+
'nonexistent intrinsic throws'
|
|
36
|
+
);
|
|
37
|
+
t['throws'](
|
|
38
|
+
function () { callBound('does not exist', true); },
|
|
39
|
+
SyntaxError,
|
|
40
|
+
'allowMissing arg still throws for unknown intrinsic'
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
|
44
|
+
st['throws'](
|
|
45
|
+
function () { callBound('WeakRef'); },
|
|
46
|
+
TypeError,
|
|
47
|
+
'real but absent intrinsic throws'
|
|
48
|
+
);
|
|
49
|
+
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
|
|
50
|
+
st.end();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
t.end();
|
|
54
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/es-object
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with a single custom sponsorship URL
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## v1.0.0 - 2024-03-16
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- Initial implementation, tests, readme, types [`f1499db`](https://github.com/ljharb/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82)
|
|
13
|
+
- Initial commit [`99eedc7`](https://github.com/ljharb/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a)
|
|
14
|
+
- [meta] rename repo [`fc851fa`](https://github.com/ljharb/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa)
|
|
15
|
+
- npm init [`b909377`](https://github.com/ljharb/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f)
|
|
16
|
+
- Only apps should have lockfiles [`7249edd`](https://github.com/ljharb/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Jordan Harband
|
|
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.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# es-object-atoms <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![License][license-image]][license-url]
|
|
6
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
7
|
+
|
|
8
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
9
|
+
|
|
10
|
+
ES Object-related atoms: Object, ToObject, RequireObjectCoercible.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
const assert = require('assert');
|
|
16
|
+
|
|
17
|
+
const $Object = require('es-object-atoms');
|
|
18
|
+
const ToObject = require('es-object-atoms/ToObject');
|
|
19
|
+
const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
|
|
20
|
+
|
|
21
|
+
assert.equal($Object, Object);
|
|
22
|
+
assert.throws(() => ToObject(null), TypeError);
|
|
23
|
+
assert.throws(() => ToObject(undefined), TypeError);
|
|
24
|
+
assert.throws(() => RequireObjectCoercible(null), TypeError);
|
|
25
|
+
assert.throws(() => RequireObjectCoercible(undefined), TypeError);
|
|
26
|
+
|
|
27
|
+
assert.deepEqual(RequireObjectCoercible(true), true);
|
|
28
|
+
assert.deepEqual(ToObject(true), Object(true));
|
|
29
|
+
|
|
30
|
+
const obj = {};
|
|
31
|
+
assert.equal(RequireObjectCoercible(obj), obj);
|
|
32
|
+
assert.equal(ToObject(obj), obj);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Tests
|
|
36
|
+
Simply clone the repo, `npm install`, and run `npm test`
|
|
37
|
+
|
|
38
|
+
## Security
|
|
39
|
+
|
|
40
|
+
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
|
41
|
+
|
|
42
|
+
[package-url]: https://npmjs.org/package/es-object-atoms
|
|
43
|
+
[npm-version-svg]: https://versionbadg.es/ljharb/es-object-atoms.svg
|
|
44
|
+
[deps-svg]: https://david-dm.org/ljharb/es-object-atoms.svg
|
|
45
|
+
[deps-url]: https://david-dm.org/ljharb/es-object-atoms
|
|
46
|
+
[dev-deps-svg]: https://david-dm.org/ljharb/es-object-atoms/dev-status.svg
|
|
47
|
+
[dev-deps-url]: https://david-dm.org/ljharb/es-object-atoms#info=devDependencies
|
|
48
|
+
[npm-badge-png]: https://nodei.co/npm/es-object-atoms.png?downloads=true&stars=true
|
|
49
|
+
[license-image]: https://img.shields.io/npm/l/es-object-atoms.svg
|
|
50
|
+
[license-url]: LICENSE
|
|
51
|
+
[downloads-image]: https://img.shields.io/npm/dm/es-object.svg
|
|
52
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=es-object-atoms
|
|
53
|
+
[codecov-image]: https://codecov.io/gh/ljharb/es-object-atoms/branch/main/graphs/badge.svg
|
|
54
|
+
[codecov-url]: https://app.codecov.io/gh/ljharb/es-object-atoms/
|
|
55
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-object-atoms
|
|
56
|
+
[actions-url]: https://github.com/ljharb/es-object-atoms/actions
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $TypeError = require('es-errors/type');
|
|
4
|
+
|
|
5
|
+
/** @type {import('./RequireObjectCoercible')} */
|
|
6
|
+
module.exports = function RequireObjectCoercible(value) {
|
|
7
|
+
if (value == null) {
|
|
8
|
+
throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value));
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $Object = require('./');
|
|
4
|
+
var RequireObjectCoercible = require('./RequireObjectCoercible');
|
|
5
|
+
|
|
6
|
+
/** @type {import('./ToObject')} */
|
|
7
|
+
module.exports = function ToObject(value) {
|
|
8
|
+
RequireObjectCoercible(value);
|
|
9
|
+
return $Object(value);
|
|
10
|
+
};
|