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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "es-object-atoms",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./RequireObjectCoercible": "./RequireObjectCoercible.js",
|
|
9
|
+
"./ToObject": "./ToObject.js",
|
|
10
|
+
"./package.json": "./package.json"
|
|
11
|
+
},
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"scripts": {
|
|
14
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
15
|
+
"prepublishOnly": "safe-publish-latest",
|
|
16
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
17
|
+
"pretest": "npm run lint",
|
|
18
|
+
"test": "npm run tests-only",
|
|
19
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
20
|
+
"posttest": "aud --production",
|
|
21
|
+
"prelint": "evalmd README.md",
|
|
22
|
+
"lint": "eslint --ext=js,mjs .",
|
|
23
|
+
"postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
|
|
24
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
25
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/ljharb/es-object-atoms.git"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"javascript",
|
|
33
|
+
"ecmascript",
|
|
34
|
+
"object",
|
|
35
|
+
"toobject",
|
|
36
|
+
"coercible"
|
|
37
|
+
],
|
|
38
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/ljharb/es-object-atoms/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/ljharb/es-object-atoms#readme",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"es-errors": "^1.3.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
49
|
+
"@ljharb/tsconfig": "^0.2.0",
|
|
50
|
+
"@types/tape": "^5.6.4",
|
|
51
|
+
"aud": "^2.0.4",
|
|
52
|
+
"auto-changelog": "^2.4.0",
|
|
53
|
+
"eclint": "^2.8.1",
|
|
54
|
+
"eslint": "^8.8.0",
|
|
55
|
+
"evalmd": "^0.0.19",
|
|
56
|
+
"in-publish": "^2.0.1",
|
|
57
|
+
"npmignore": "^0.3.1",
|
|
58
|
+
"nyc": "^10.3.2",
|
|
59
|
+
"safe-publish-latest": "^2.0.0",
|
|
60
|
+
"tape": "^5.7.5",
|
|
61
|
+
"typescript": "next"
|
|
62
|
+
},
|
|
63
|
+
"auto-changelog": {
|
|
64
|
+
"output": "CHANGELOG.md",
|
|
65
|
+
"template": "keepachangelog",
|
|
66
|
+
"unreleased": false,
|
|
67
|
+
"commitLimit": false,
|
|
68
|
+
"backfillLimit": false,
|
|
69
|
+
"hideCredit": true
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"ignore": [
|
|
73
|
+
".github/workflows"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"engines": {
|
|
77
|
+
"node": ">= 0.4"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var $Object = require('../');
|
|
6
|
+
var ToObject = require('..//ToObject');
|
|
7
|
+
var RequireObjectCoercible = require('..//RequireObjectCoercible');
|
|
8
|
+
|
|
9
|
+
test('errors', function (t) {
|
|
10
|
+
t.equal($Object, Object);
|
|
11
|
+
// @ts-expect-error
|
|
12
|
+
t['throws'](function () { ToObject(null); }, TypeError);
|
|
13
|
+
// @ts-expect-error
|
|
14
|
+
t['throws'](function () { ToObject(undefined); }, TypeError);
|
|
15
|
+
// @ts-expect-error
|
|
16
|
+
t['throws'](function () { RequireObjectCoercible(null); }, TypeError);
|
|
17
|
+
// @ts-expect-error
|
|
18
|
+
t['throws'](function () { RequireObjectCoercible(undefined); }, TypeError);
|
|
19
|
+
|
|
20
|
+
t.deepEqual(RequireObjectCoercible(true), true);
|
|
21
|
+
t.deepEqual(ToObject(true), Object(true));
|
|
22
|
+
|
|
23
|
+
var obj = {};
|
|
24
|
+
t.equal(RequireObjectCoercible(obj), obj);
|
|
25
|
+
t.equal(ToObject(obj), obj);
|
|
26
|
+
|
|
27
|
+
t.end();
|
|
28
|
+
});
|
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.2.6](https://github.com/ljharb/get-intrinsic/compare/v1.2.5...v1.2.6) - 2024-12-11
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Refactor] use `math-intrinsics` [`841be86`](https://github.com/ljharb/get-intrinsic/commit/841be8641a9254c4c75483b30c8871b5d5065926)
|
|
13
|
+
- [Refactor] use `es-object-atoms` [`42057df`](https://github.com/ljharb/get-intrinsic/commit/42057dfa16f66f64787e66482af381cc6f31d2c1)
|
|
14
|
+
- [Deps] update `call-bind-apply-helpers` [`45afa24`](https://github.com/ljharb/get-intrinsic/commit/45afa24a9ee4d6d3c172db1f555b16cb27843ef4)
|
|
15
|
+
- [Dev Deps] update `call-bound` [`9cba9c6`](https://github.com/ljharb/get-intrinsic/commit/9cba9c6e70212bc163b7a5529cb25df46071646f)
|
|
16
|
+
|
|
8
17
|
## [v1.2.5](https://github.com/ljharb/get-intrinsic/compare/v1.2.4...v1.2.5) - 2024-12-06
|
|
9
18
|
|
|
10
19
|
### Commits
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var undefined;
|
|
4
4
|
|
|
5
|
+
var $Object = require('es-object-atoms');
|
|
6
|
+
|
|
5
7
|
var $Error = require('es-errors');
|
|
6
8
|
var $EvalError = require('es-errors/eval');
|
|
7
9
|
var $RangeError = require('es-errors/range');
|
|
@@ -10,6 +12,12 @@ var $SyntaxError = require('es-errors/syntax');
|
|
|
10
12
|
var $TypeError = require('es-errors/type');
|
|
11
13
|
var $URIError = require('es-errors/uri');
|
|
12
14
|
|
|
15
|
+
var abs = require('math-intrinsics/abs');
|
|
16
|
+
var floor = require('math-intrinsics/floor');
|
|
17
|
+
var max = require('math-intrinsics/max');
|
|
18
|
+
var min = require('math-intrinsics/min');
|
|
19
|
+
var pow = require('math-intrinsics/pow');
|
|
20
|
+
|
|
13
21
|
var $Function = Function;
|
|
14
22
|
|
|
15
23
|
// eslint-disable-next-line consistent-return
|
|
@@ -46,7 +54,7 @@ var hasSymbols = require('has-symbols')();
|
|
|
46
54
|
var getDunderProto = require('dunder-proto/get');
|
|
47
55
|
|
|
48
56
|
var getProto = (typeof Reflect === 'function' && Reflect.getPrototypeOf)
|
|
49
|
-
|| Object.getPrototypeOf
|
|
57
|
+
|| $Object.getPrototypeOf
|
|
50
58
|
|| getDunderProto;
|
|
51
59
|
|
|
52
60
|
var $apply = require('call-bind-apply-helpers/functionApply');
|
|
@@ -97,7 +105,7 @@ var INTRINSICS = {
|
|
|
97
105
|
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
|
|
98
106
|
'%Math%': Math,
|
|
99
107
|
'%Number%': Number,
|
|
100
|
-
'%Object%': Object,
|
|
108
|
+
'%Object%': $Object,
|
|
101
109
|
'%Object.getOwnPropertyDescriptor%': $gOPD,
|
|
102
110
|
'%parseFloat%': parseFloat,
|
|
103
111
|
'%parseInt%': parseInt,
|
|
@@ -128,7 +136,12 @@ var INTRINSICS = {
|
|
|
128
136
|
|
|
129
137
|
'%Function.prototype.call%': $call,
|
|
130
138
|
'%Function.prototype.apply%': $apply,
|
|
131
|
-
'%Object.defineProperty%': $defineProperty
|
|
139
|
+
'%Object.defineProperty%': $defineProperty,
|
|
140
|
+
'%Math.abs%': abs,
|
|
141
|
+
'%Math.floor%': floor,
|
|
142
|
+
'%Math.max%': max,
|
|
143
|
+
'%Math.min%': min,
|
|
144
|
+
'%Math.pow%': pow
|
|
132
145
|
};
|
|
133
146
|
|
|
134
147
|
if (getProto) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-intrinsic",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "Get and robustly cache all JS language-level intrinsics at first require time",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -44,19 +44,21 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/ljharb/get-intrinsic#readme",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"call-bind-apply-helpers": "^1.0.
|
|
47
|
+
"call-bind-apply-helpers": "^1.0.1",
|
|
48
48
|
"dunder-proto": "^1.0.0",
|
|
49
49
|
"es-define-property": "^1.0.1",
|
|
50
50
|
"es-errors": "^1.3.0",
|
|
51
|
+
"es-object-atoms": "^1.0.0",
|
|
51
52
|
"function-bind": "^1.1.2",
|
|
52
53
|
"gopd": "^1.2.0",
|
|
53
54
|
"has-symbols": "^1.1.0",
|
|
54
|
-
"hasown": "^2.0.2"
|
|
55
|
+
"hasown": "^2.0.2",
|
|
56
|
+
"math-intrinsics": "^1.0.0"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
57
59
|
"@ljharb/eslint-config": "^21.1.1",
|
|
58
60
|
"auto-changelog": "^2.5.0",
|
|
59
|
-
"call-bound": "^1.0.
|
|
61
|
+
"call-bound": "^1.0.2",
|
|
60
62
|
"encoding": "^0.1.13",
|
|
61
63
|
"es-abstract": "^1.23.5",
|
|
62
64
|
"es-value-fixtures": "^1.5.0",
|
|
@@ -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/math-intrinsics
|
|
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-12-11
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe)
|
|
13
|
+
- Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c)
|
|
14
|
+
- [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5)
|
|
15
|
+
- npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2)
|
|
16
|
+
- Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 ECMAScript Shims
|
|
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,49 @@
|
|
|
1
|
+
# math-intrinsics <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 Math-related intrinsics and helpers, robustly cached.
|
|
11
|
+
|
|
12
|
+
- `abs`
|
|
13
|
+
- `floor`
|
|
14
|
+
- `isFinite`
|
|
15
|
+
- `isInteger`
|
|
16
|
+
- `isNaN`
|
|
17
|
+
- `isNegativeZero`
|
|
18
|
+
- `max`
|
|
19
|
+
- `min`
|
|
20
|
+
- `mod`
|
|
21
|
+
- `pow`
|
|
22
|
+
- `sign`
|
|
23
|
+
- `constants/maxArrayLength`
|
|
24
|
+
- `constants/maxSafeInteger`
|
|
25
|
+
- `constants/maxValue`
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Tests
|
|
29
|
+
Simply clone the repo, `npm install`, and run `npm test`
|
|
30
|
+
|
|
31
|
+
## Security
|
|
32
|
+
|
|
33
|
+
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
|
34
|
+
|
|
35
|
+
[package-url]: https://npmjs.org/package/math-intrinsics
|
|
36
|
+
[npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg
|
|
37
|
+
[deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg
|
|
38
|
+
[deps-url]: https://david-dm.org/es-shims/math-intrinsics
|
|
39
|
+
[dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg
|
|
40
|
+
[dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies
|
|
41
|
+
[npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true
|
|
42
|
+
[license-image]: https://img.shields.io/npm/l/math-intrinsics.svg
|
|
43
|
+
[license-url]: LICENSE
|
|
44
|
+
[downloads-image]: https://img.shields.io/npm/dm/es-object.svg
|
|
45
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics
|
|
46
|
+
[codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg
|
|
47
|
+
[codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/
|
|
48
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics
|
|
49
|
+
[actions-url]: https://github.com/es-shims/math-intrinsics/actions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.abs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.floor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $isNaN = require('./isNaN');
|
|
4
|
+
|
|
5
|
+
/** @type {import('./isFinite')} */
|
|
6
|
+
module.exports = function isFinite(x) {
|
|
7
|
+
return (typeof x === 'number' || typeof x === 'bigint')
|
|
8
|
+
&& !$isNaN(x)
|
|
9
|
+
&& x !== Infinity
|
|
10
|
+
&& x !== -Infinity;
|
|
11
|
+
};
|
|
12
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $abs = require('./abs');
|
|
4
|
+
var $floor = require('./floor');
|
|
5
|
+
|
|
6
|
+
var $isNaN = require('./isNaN');
|
|
7
|
+
var $isFinite = require('./isFinite');
|
|
8
|
+
|
|
9
|
+
/** @type {import('./isInteger')} */
|
|
10
|
+
module.exports = function isInteger(argument) {
|
|
11
|
+
if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
var absValue = $abs(argument);
|
|
15
|
+
return $floor(absValue) === absValue;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Number.isNaN;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.max;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.min;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "math-intrinsics",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "ES Math-related intrinsics and helpers, robustly cached.",
|
|
5
|
+
"main": false,
|
|
6
|
+
"exports": {
|
|
7
|
+
"./abs": "./abs.js",
|
|
8
|
+
"./floor": "./floor.js",
|
|
9
|
+
"./isFinite": "./isFinite.js",
|
|
10
|
+
"./isInteger": "./isInteger.js",
|
|
11
|
+
"./isNaN": "./isNaN.js",
|
|
12
|
+
"./isNegativeZero": "./isNegativeZero.js",
|
|
13
|
+
"./max": "./max.js",
|
|
14
|
+
"./min": "./min.js",
|
|
15
|
+
"./mod": "./mod.js",
|
|
16
|
+
"./pow": "./pow.js",
|
|
17
|
+
"./sign": "./sign.js",
|
|
18
|
+
"./constants/maxArrayLength": "./constants/maxArrayLength.js",
|
|
19
|
+
"./constants/maxSafeInteger": "./constants/maxSafeInteger.js",
|
|
20
|
+
"./constants/maxValue": "./constants/maxValue.js",
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"scripts": {
|
|
25
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
26
|
+
"prepublishOnly": "safe-publish-latest",
|
|
27
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
28
|
+
"pretest": "npm run lint",
|
|
29
|
+
"test": "npm run tests-only",
|
|
30
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
31
|
+
"posttest": "npx npm@'>= 10.2' audit --production",
|
|
32
|
+
"prelint": "evalmd README.md",
|
|
33
|
+
"lint": "eslint --ext=js,mjs .",
|
|
34
|
+
"postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
|
|
35
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
36
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/es-shims/math-intrinsics.git"
|
|
41
|
+
},
|
|
42
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/es-shims/math-intrinsics/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/es-shims/math-intrinsics#readme",
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@arethetypeswrong/cli": "^0.17.1",
|
|
50
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
51
|
+
"@ljharb/tsconfig": "^0.2.2",
|
|
52
|
+
"@types/for-each": "^0.3.3",
|
|
53
|
+
"@types/object-inspect": "^1.13.0",
|
|
54
|
+
"@types/tape": "^5.6.5",
|
|
55
|
+
"auto-changelog": "^2.5.0",
|
|
56
|
+
"eclint": "^2.8.1",
|
|
57
|
+
"es-value-fixtures": "^1.5.0",
|
|
58
|
+
"eslint": "^8.8.0",
|
|
59
|
+
"evalmd": "^0.0.19",
|
|
60
|
+
"for-each": "^0.3.3",
|
|
61
|
+
"in-publish": "^2.0.1",
|
|
62
|
+
"npmignore": "^0.3.1",
|
|
63
|
+
"nyc": "^10.3.2",
|
|
64
|
+
"object-inspect": "^1.13.3",
|
|
65
|
+
"safe-publish-latest": "^2.0.0",
|
|
66
|
+
"tape": "^5.9.0",
|
|
67
|
+
"typescript": "next"
|
|
68
|
+
},
|
|
69
|
+
"auto-changelog": {
|
|
70
|
+
"output": "CHANGELOG.md",
|
|
71
|
+
"template": "keepachangelog",
|
|
72
|
+
"unreleased": false,
|
|
73
|
+
"commitLimit": false,
|
|
74
|
+
"backfillLimit": false,
|
|
75
|
+
"hideCredit": true
|
|
76
|
+
},
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"ignore": [
|
|
79
|
+
".github/workflows"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"engines": {
|
|
83
|
+
"node": ">= 0.4"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Math.pow;
|