@schematize/refs 0.1.5 → 0.1.19
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/.eslintrc.json +36 -36
- package/README.md +16 -0
- package/browser/document.body.mjs +1 -1
- package/browser/document.head.mjs +1 -1
- package/browser/fetch.mjs +4 -0
- package/browser/localStorage.mjs +4 -0
- package/browser/sessionStorage.mjs +4 -0
- package/browser/window.history.mjs +1 -1
- package/browser/window.location.mjs +1 -1
- package/isNaN.mjs +4 -0
- package/js/Array.isArray.mjs +1 -1
- package/js/Array.prototype.at.call.mjs +5 -0
- package/js/Array.prototype.concat.call.mjs +5 -0
- package/js/Array.prototype.copyWithin.call.mjs +5 -0
- package/js/Array.prototype.entries.call.mjs +5 -0
- package/js/Array.prototype.every.call.mjs +5 -0
- package/js/Array.prototype.fill.call.mjs +5 -0
- package/js/Array.prototype.filter.call.mjs +5 -0
- package/js/Array.prototype.find.call.mjs +5 -0
- package/js/Array.prototype.findIndex.call.mjs +5 -0
- package/js/Array.prototype.findLast.call.mjs +5 -0
- package/js/Array.prototype.findLastIndex.call.mjs +5 -0
- package/js/Array.prototype.flat.call.mjs +5 -0
- package/js/Array.prototype.flatMap.call.mjs +5 -0
- package/js/Array.prototype.forEach.call.mjs +5 -0
- package/js/Array.prototype.includes.call.mjs +5 -0
- package/js/Array.prototype.indexOf.call.mjs +5 -0
- package/js/Array.prototype.join.call.mjs +5 -0
- package/js/Array.prototype.keys.call.mjs +5 -0
- package/js/Array.prototype.lastIndexOf.call.mjs +5 -0
- package/js/Array.prototype.map.call.mjs +5 -0
- package/js/Array.prototype.mjs +1 -1
- package/js/Array.prototype.pop.call.mjs +5 -0
- package/js/Array.prototype.push.call.mjs +5 -0
- package/js/Array.prototype.reduce.call.mjs +5 -0
- package/js/Array.prototype.reduceRight.call.mjs +5 -0
- package/js/Array.prototype.reverse.call.mjs +5 -0
- package/js/Array.prototype.shift.call.mjs +5 -0
- package/js/Array.prototype.slice.call.mjs +5 -0
- package/js/Array.prototype.some.call.mjs +5 -0
- package/js/Array.prototype.sort.call.mjs +5 -0
- package/js/Array.prototype.splice.call.mjs +5 -0
- package/js/Array.prototype.toLocaleString.call.mjs +5 -0
- package/js/Array.prototype.toString.call.mjs +5 -0
- package/js/Array.prototype.unshift.call.mjs +5 -0
- package/js/Array.prototype.values.call.mjs +5 -0
- package/js/AsyncFunction.mjs +4 -0
- package/js/AsyncIterator.mjs +4 -0
- package/js/BigInt.mjs +4 -0
- package/js/Date.mjs +4 -0
- package/js/Function.prototype.mjs +1 -1
- package/js/Generator.mjs +4 -0
- package/js/GeneratorFunction.mjs +4 -0
- package/js/Infinity.mjs +4 -0
- package/js/Intl.Collator.mjs +6 -0
- package/js/Intl.DateTimeFormat.mjs +6 -0
- package/js/Intl.ListFormat.mjs +6 -0
- package/js/Intl.Locale.mjs +6 -0
- package/js/Intl.NumberFormat.mjs +6 -0
- package/js/Intl.PluralRules.mjs +6 -0
- package/js/Intl.RelativeTimeFormat.mjs +6 -0
- package/js/Intl.mjs +4 -0
- package/js/Iterator.mjs +4 -0
- package/js/JSON.parse.mjs +1 -1
- package/js/JSON.stringify.mjs +1 -1
- package/js/Math.E.mjs +1 -1
- package/js/Math.LN10.mjs +1 -1
- package/js/Math.LN2.mjs +1 -1
- package/js/Math.LOG10E.mjs +1 -1
- package/js/Math.LOG2E.mjs +1 -1
- package/js/Math.PI.mjs +1 -1
- package/js/Math.SQRT1_2.mjs +1 -1
- package/js/Math.SQRT2.mjs +1 -1
- package/js/Math.abs.mjs +1 -1
- package/js/Math.acos.mjs +2 -2
- package/js/Math.acosh.mjs +1 -1
- package/js/Math.asin.mjs +1 -1
- package/js/Math.asinh.mjs +1 -1
- package/js/Math.atan.mjs +1 -1
- package/js/Math.atan2.mjs +1 -1
- package/js/Math.atanh.mjs +1 -1
- package/js/Math.cbrt.mjs +1 -1
- package/js/Math.ceil.mjs +1 -1
- package/js/Math.clz32.mjs +1 -1
- package/js/Math.cos.mjs +1 -1
- package/js/Math.cosh.mjs +1 -1
- package/js/Math.exp.mjs +1 -1
- package/js/Math.expm1.mjs +1 -1
- package/js/Math.floor.mjs +1 -1
- package/js/Math.fround.mjs +1 -1
- package/js/Math.hypot.mjs +1 -1
- package/js/Math.imul.mjs +1 -1
- package/js/Math.log.mjs +1 -1
- package/js/Math.log10.mjs +1 -1
- package/js/Math.log1p.mjs +1 -1
- package/js/Math.log2.mjs +1 -1
- package/js/Math.max.mjs +1 -1
- package/js/Math.min.mjs +1 -1
- package/js/Math.pow.mjs +1 -1
- package/js/Math.random.mjs +1 -1
- package/js/Math.round.mjs +1 -1
- package/js/Math.sign.mjs +1 -1
- package/js/Math.sin.mjs +1 -1
- package/js/Math.sinh.mjs +1 -1
- package/js/Math.sqrt.mjs +1 -1
- package/js/Math.tanh.mjs +1 -1
- package/js/Math.trunc.mjs +1 -1
- package/js/NaN.mjs +4 -0
- package/js/Object.assign.mjs +1 -1
- package/js/Object.create.mjs +1 -1
- package/js/Object.defineProperties.mjs +6 -0
- package/js/Object.defineProperty.mjs +1 -1
- package/js/Object.entries.mjs +6 -0
- package/js/Object.freeze.mjs +6 -0
- package/js/Object.fromEntries.mjs +6 -0
- package/js/Object.getOwnPropertyDescriptor.mjs +1 -1
- package/js/Object.getOwnPropertyDescriptors.mjs +6 -0
- package/js/Object.getOwnPropertyNames.mjs +6 -0
- package/js/Object.getOwnPropertySymbols.mjs +6 -0
- package/js/Object.getPrototypeOf.mjs +1 -1
- package/js/Object.hasOwn.mjs +6 -0
- package/js/Object.is.mjs +6 -0
- package/js/Object.isExtensible.mjs +6 -0
- package/js/Object.isFrozen.mjs +6 -0
- package/js/Object.isSealed.mjs +6 -0
- package/js/Object.keys.mjs +1 -1
- package/js/Object.preventExtension.mjs +6 -0
- package/js/Object.prototype.hasOwnProperty.call.mjs +5 -0
- package/js/Object.prototype.isPrototypeOf.call.mjs +5 -0
- package/js/Object.prototype.mjs +1 -1
- package/js/Object.prototype.propertyIsEnumerable.call.mjs +5 -0
- package/js/Object.prototype.toLocaleString.call.mjs +5 -0
- package/js/Object.prototype.toString.call.mjs +5 -0
- package/js/Object.prototype.valueOf.call.mjs +5 -0
- package/js/Object.seal.mjs +6 -0
- package/js/Object.setPrototypeOf.mjs +1 -1
- package/js/Object.values.mjs +1 -1
- package/js/Promise.all.mjs +1 -1
- package/js/Promise.allSettled.mjs +1 -1
- package/js/Promise.race.mjs +1 -1
- package/js/Promise.reject.mjs +1 -1
- package/js/Promise.resolve.mjs +1 -1
- package/js/Reflect.mjs +4 -0
- package/js/RegExp.mjs +4 -0
- package/js/Set.mjs +4 -0
- package/js/Symbol.for.mjs +1 -1
- package/js/WeakSet.mjs +4 -0
- package/js/decodeURI.mjs +4 -0
- package/js/encodeURI.mjs +4 -0
- package/js/isFinite.mjs +4 -0
- package/js/isNaN.mjs +4 -0
- package/js/parseFloat.mjs +4 -0
- package/js/parseInt.mjs +4 -0
- package/main.mjs +2 -2
- package/package.json +11 -8
- package/test.browser.mjs +8 -8
- package/test.mjs +118 -0
- package/test.js.mjs +0 -42
package/.eslintrc.json
CHANGED
@@ -1,39 +1,39 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
]
|
21
|
-
}
|
22
|
-
],
|
23
|
-
"linebreak-style": [
|
24
|
-
"error",
|
25
|
-
"unix"
|
26
|
-
],
|
27
|
-
"quotes": [
|
28
|
-
"error",
|
29
|
-
"single",
|
30
|
-
{
|
31
|
-
"allowTemplateLiterals": true
|
32
|
-
}
|
33
|
-
],
|
34
|
-
"semi": [
|
35
|
-
"error",
|
36
|
-
"always"
|
2
|
+
"env": {
|
3
|
+
"browser": true,
|
4
|
+
"node": true,
|
5
|
+
"es2020": true
|
6
|
+
},
|
7
|
+
"extends": "eslint:recommended",
|
8
|
+
"parserOptions": {
|
9
|
+
"ecmaVersion": 2020,
|
10
|
+
"sourceType": "module"
|
11
|
+
},
|
12
|
+
"rules": {
|
13
|
+
"indent": [
|
14
|
+
"error",
|
15
|
+
2,
|
16
|
+
{
|
17
|
+
"MemberExpression": "off",
|
18
|
+
"ignoredNodes": [
|
19
|
+
"ConditionalExpression"
|
37
20
|
]
|
38
|
-
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"linebreak-style": [
|
24
|
+
"error",
|
25
|
+
"unix"
|
26
|
+
],
|
27
|
+
"quotes": [
|
28
|
+
"error",
|
29
|
+
"single",
|
30
|
+
{
|
31
|
+
"allowTemplateLiterals": true
|
32
|
+
}
|
33
|
+
],
|
34
|
+
"semi": [
|
35
|
+
"error",
|
36
|
+
"always"
|
37
|
+
]
|
38
|
+
}
|
39
39
|
}
|
package/README.md
CHANGED
@@ -1,2 +1,18 @@
|
|
1
1
|
# refs
|
2
2
|
A list of references to built-ins, native objects, etc. This helps with minification and makes code smaller.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
```
|
7
|
+
npm install @schematize/refs
|
8
|
+
```
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
To use, simply import the variable that you would like to reference.
|
13
|
+
|
14
|
+
```
|
15
|
+
import Object from '@schematize/refs/js/Object.mjs';
|
16
|
+
```
|
17
|
+
|
18
|
+
If you are using a bundler like rollup.js, you can use this reference across multiple modules and the resulting bundle will only contain 1 variable reference rather than a separate variable refernece for each module.
|
package/isNaN.mjs
ADDED
package/js/Array.isArray.mjs
CHANGED
package/js/Array.prototype.mjs
CHANGED
package/js/BigInt.mjs
ADDED
package/js/Date.mjs
ADDED
package/js/Generator.mjs
ADDED
package/js/Infinity.mjs
ADDED
package/js/Intl.mjs
ADDED
package/js/Iterator.mjs
ADDED
package/js/JSON.parse.mjs
CHANGED
package/js/JSON.stringify.mjs
CHANGED
package/js/Math.E.mjs
CHANGED
package/js/Math.LN10.mjs
CHANGED
package/js/Math.LN2.mjs
CHANGED
package/js/Math.LOG10E.mjs
CHANGED
package/js/Math.LOG2E.mjs
CHANGED
package/js/Math.PI.mjs
CHANGED
package/js/Math.SQRT1_2.mjs
CHANGED
package/js/Math.SQRT2.mjs
CHANGED
package/js/Math.abs.mjs
CHANGED
package/js/Math.acos.mjs
CHANGED
package/js/Math.acosh.mjs
CHANGED