caller-arguments 1.0.0 → 1.0.1
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/index.js +12 -2
- package/package.json +116 -6
package/index.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
const just = require("basic-functions")
|
|
2
|
+
const $Error = require("es-error-intrinsics/Error")
|
|
3
|
+
const construct = require("construct-new-second")
|
|
4
|
+
const $Array = require("array-intrinsic-ai")
|
|
5
|
+
|
|
1
6
|
module.exports = function args(returnArray) {
|
|
2
7
|
try {
|
|
3
8
|
var callerArguments = args.caller.arguments
|
|
4
|
-
return returnArray ? Array.from(callerArguments) : callerArguments
|
|
9
|
+
return returnArray ? $Array.from(callerArguments) : callerArguments
|
|
5
10
|
} catch {
|
|
6
|
-
throw
|
|
11
|
+
just.throw(
|
|
12
|
+
construct(
|
|
13
|
+
$Error,
|
|
14
|
+
"caller-arguments cannot be used with arrow functions or in strict mode",
|
|
15
|
+
),
|
|
16
|
+
)
|
|
7
17
|
}
|
|
8
18
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,127 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caller-arguments",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Function that returns the arguments passed into its caller.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
5
|
"keywords": [
|
|
10
6
|
"stupid"
|
|
11
7
|
],
|
|
12
|
-
"
|
|
8
|
+
"homepage": "https://github.com/10xly/caller-arguments#readme",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/10xly/caller-arguments/issues"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/10xly/caller-arguments.git"
|
|
15
|
+
},
|
|
13
16
|
"license": "MIT",
|
|
17
|
+
"author": "me",
|
|
18
|
+
"type": "commonjs",
|
|
19
|
+
"main": "index.js",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "node test"
|
|
22
|
+
},
|
|
14
23
|
"dependencies": {
|
|
24
|
+
"@errorstream/err": "^1.1.0",
|
|
25
|
+
"array-buffer-byte-length": "^1.0.2",
|
|
26
|
+
"array-intrinsic-ai": "^1.0.0",
|
|
27
|
+
"arraybuffer.prototype.slice": "^1.0.4",
|
|
28
|
+
"async-function": "^1.0.0",
|
|
29
|
+
"available-typed-arrays": "^1.0.7",
|
|
30
|
+
"basic-functions": "^1.0.6",
|
|
31
|
+
"call-bind": "^1.0.8",
|
|
32
|
+
"call-bind-apply-helpers": "^1.0.2",
|
|
33
|
+
"call-bound": "^1.0.4",
|
|
34
|
+
"construct-new-second": "^1.0.0",
|
|
35
|
+
"data-view-buffer": "^1.0.2",
|
|
36
|
+
"data-view-byte-length": "^1.0.2",
|
|
37
|
+
"data-view-byte-offset": "^1.0.1",
|
|
38
|
+
"define-data-property": "^1.1.4",
|
|
39
|
+
"define-properties": "^1.2.1",
|
|
40
|
+
"dunder-proto": "^1.0.1",
|
|
41
|
+
"es-abstract": "^1.24.1",
|
|
42
|
+
"es-define-property": "^1.0.1",
|
|
43
|
+
"es-error-intrinsics": "^1.0.1",
|
|
44
|
+
"es-errors": "^1.3.0",
|
|
45
|
+
"es-get-iterator": "^1.1.3",
|
|
46
|
+
"es-object-atoms": "^1.1.1",
|
|
47
|
+
"es-set-tostringtag": "^2.1.0",
|
|
48
|
+
"es-to-primitive": "^1.3.0",
|
|
49
|
+
"for-each": "^0.3.5",
|
|
50
|
+
"function-bind": "^1.1.2",
|
|
51
|
+
"function.prototype.name": "^1.1.8",
|
|
52
|
+
"functions-have-names": "^1.2.3",
|
|
53
|
+
"generator-function": "^2.0.1",
|
|
54
|
+
"get-intrinsic": "^1.3.0",
|
|
55
|
+
"get-proto": "^1.0.1",
|
|
56
|
+
"get-symbol-description": "^1.1.0",
|
|
57
|
+
"globalthis": "^1.0.4",
|
|
58
|
+
"gopd": "^1.2.0",
|
|
59
|
+
"has-bigints": "^1.1.0",
|
|
60
|
+
"has-property-descriptors": "^1.0.2",
|
|
61
|
+
"has-proto": "^1.2.0",
|
|
62
|
+
"has-symbols": "^1.1.0",
|
|
63
|
+
"has-tostringtag": "^1.0.2",
|
|
64
|
+
"hasown": "^2.0.2",
|
|
65
|
+
"internal-slot": "^1.1.0",
|
|
66
|
+
"is-arguments": "^1.2.0",
|
|
67
|
+
"is-array-buffer": "^3.0.5",
|
|
68
|
+
"is-arrow-function": "^2.0.3",
|
|
69
|
+
"is-async-function": "^2.1.1",
|
|
70
|
+
"is-bigint": "^1.1.0",
|
|
71
|
+
"is-boolean-object": "^1.2.2",
|
|
72
|
+
"is-callable": "^1.2.7",
|
|
73
|
+
"is-data-view": "^1.0.2",
|
|
74
|
+
"is-date-object": "^1.1.0",
|
|
75
|
+
"is-finalizationregistry": "^1.1.1",
|
|
76
|
+
"is-generator-function": "^1.1.2",
|
|
77
|
+
"is-map": "^2.0.3",
|
|
78
|
+
"is-negative-zero": "^2.0.3",
|
|
79
|
+
"is-number-object": "^1.1.1",
|
|
80
|
+
"is-regex": "^1.2.1",
|
|
81
|
+
"is-set": "^2.0.3",
|
|
82
|
+
"is-shared-array-buffer": "^1.0.4",
|
|
83
|
+
"is-string": "^1.1.1",
|
|
84
|
+
"is-symbol": "^1.1.1",
|
|
85
|
+
"is-typed-array": "^1.1.15",
|
|
86
|
+
"is-weakmap": "^2.0.2",
|
|
87
|
+
"is-weakref": "^1.1.1",
|
|
88
|
+
"is-weakset": "^2.0.4",
|
|
89
|
+
"isarray": "^2.0.5",
|
|
90
|
+
"math-intrinsics": "^1.1.0",
|
|
91
|
+
"object-inspect": "^1.13.4",
|
|
92
|
+
"object-keys": "^1.1.1",
|
|
93
|
+
"object.assign": "^4.1.7",
|
|
94
|
+
"object.entries": "^1.1.9",
|
|
95
|
+
"object.getprototypeof": "^1.0.7",
|
|
96
|
+
"own-keys": "^1.0.1",
|
|
97
|
+
"possible-typed-array-names": "^1.1.0",
|
|
98
|
+
"reflect.getprototypeof": "^1.0.10",
|
|
99
|
+
"regexp.prototype.flags": "^1.5.4",
|
|
100
|
+
"safe-array-concat": "^1.1.3",
|
|
101
|
+
"safe-push-apply": "^1.0.0",
|
|
102
|
+
"safe-regex-test": "^1.1.0",
|
|
103
|
+
"set-function-length": "^1.2.2",
|
|
104
|
+
"set-function-name": "^2.0.2",
|
|
105
|
+
"set-proto": "^1.0.0",
|
|
106
|
+
"side-channel": "^1.1.0",
|
|
107
|
+
"side-channel-list": "^1.0.0",
|
|
108
|
+
"side-channel-map": "^1.0.1",
|
|
109
|
+
"side-channel-weakmap": "^1.0.2",
|
|
110
|
+
"stop-iteration-iterator": "^1.1.0",
|
|
111
|
+
"string.prototype.trim": "^1.2.10",
|
|
112
|
+
"string.prototype.trimend": "^1.0.9",
|
|
113
|
+
"string.prototype.trimstart": "^1.0.8",
|
|
114
|
+
"typed-array-buffer": "^1.0.3",
|
|
115
|
+
"typed-array-byte-length": "^1.0.3",
|
|
116
|
+
"typed-array-byte-offset": "^1.0.4",
|
|
117
|
+
"typed-array-length": "^1.0.7",
|
|
118
|
+
"unbox-primitive": "^1.1.0",
|
|
119
|
+
"which-boxed-primitive": "^1.1.1",
|
|
120
|
+
"which-builtin-type": "^1.2.1",
|
|
121
|
+
"which-collection": "^1.0.2",
|
|
122
|
+
"which-typed-array": "^1.1.20"
|
|
123
|
+
},
|
|
124
|
+
"devDependencies": {
|
|
15
125
|
"is-equal": "^1.7.0"
|
|
16
126
|
}
|
|
17
127
|
}
|