Skip to content

Commit 3e31439

Browse files
committed
Make sure all functions are named
1 parent 93be5d7 commit 3e31439

File tree

1 file changed

+39
-35
lines changed

1 file changed

+39
-35
lines changed

support/types.js

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
'use strict';
55

6+
var isArgumentsObject = require('is-arguments');
7+
68
function uncurryThis(f) {
79
return f.call.bind(f);
810
}
@@ -53,216 +55,218 @@ function checkBoxedPrimitive(value, prototypeValueOf) {
5355
var methods = [
5456
{
5557
name: 'isArgumentsObject',
56-
function: require('is-arguments'),
58+
function: isArgumentsObject
5759
},
5860
{
5961
name: 'isArrayBufferView',
6062
supported: supported.ArrayBuffer,
61-
function: ArrayBuffer.isView,
63+
function: function isArrayBufferView(value) {
64+
return ArrayBuffer.isView(value);
65+
},
6266
},
6367
{
6468
name: 'isTypedArray',
6569
supported: supported.Uint8Array,
66-
function: function(value) {
70+
function: function isTypedArray(value) {
6771
return TypedArrayProto_toStringTag(value) !== undefined;
6872
}
6973
},
7074
{
7175
name: 'isUint8Array',
7276
supported: supported.Uint8Array,
73-
function: function(value) {
77+
function: function isUint8Array(value) {
7478
return TypedArrayProto_toStringTag(value) === 'Uint8Array';
7579
}
7680
},
7781
{
7882
name: 'isUint8ClampedArray',
7983
supported: supported.Uint8Array,
80-
function: function(value) {
84+
function: function isUint8ClampedArray(value) {
8185
return TypedArrayProto_toStringTag(value) === 'Uint8ClampedArray';
8286
}
8387
},
8488
{
8589
name: 'isUint16Array',
8690
supported: supported.Uint8Array,
87-
function: function(value) {
91+
function: function isUint16Array(value) {
8892
return TypedArrayProto_toStringTag(value) === 'Uint16Array';
8993
}
9094
},
9195
{
9296
name: 'isUint32Array',
9397
supported: supported.Uint8Array,
94-
function: function(value) {
98+
function: function isUint32Array(value) {
9599
return TypedArrayProto_toStringTag(value) === 'Uint32Array';
96100
}
97101
},
98102
{
99103
name: 'isInt8Array',
100104
supported: supported.Uint8Array,
101-
function: function(value) {
105+
function: function isInt8Array(value) {
102106
return TypedArrayProto_toStringTag(value) === 'Int8Array';
103107
}
104108
},
105109
{
106110
name: 'isInt16Array',
107111
supported: supported.Uint8Array,
108-
function: function(value) {
112+
function: function isInt16Array(value) {
109113
return TypedArrayProto_toStringTag(value) === 'Int16Array';
110114
}
111115
},
112116
{
113117
name: 'isInt32Array',
114118
supported: supported.Uint8Array,
115-
function: function(value) {
119+
function: function isInt32Array(value) {
116120
return TypedArrayProto_toStringTag(value) === 'Int32Array';
117121
}
118122
},
119123
{
120124
name: 'isFloat32Array',
121125
supported: supported.Uint8Array,
122-
function: function(value) {
126+
function: function isFloat32Array(value) {
123127
return TypedArrayProto_toStringTag(value) === 'Float32Array';
124128
}
125129
},
126130
{
127131
name: 'isFloat64Array',
128132
supported: supported.Uint8Array,
129-
function: function(value) {
133+
function: function isFloat64Array(value) {
130134
return TypedArrayProto_toStringTag(value) === 'Float64Array';
131135
}
132136
},
133137
{
134138
name: 'isBigInt64Array',
135139
supported: supported.Uint8Array,
136-
function: function(value) {
140+
function: function isBigInt64Array(value) {
137141
return TypedArrayProto_toStringTag(value) === 'BigInt64Array';
138142
}
139143
},
140144
{
141145
name: 'isBigUint64Array',
142146
supported: supported.Uint8Array,
143-
function: function(value) {
147+
function: function isBigUint64Array(value) {
144148
return TypedArrayProto_toStringTag(value) === 'BigUint64Array';
145149
}
146150
},
147151
{
148152
name: 'isPromise',
149-
function: function(value) {
153+
function: function isPromise(value) {
150154
return ObjectToString(value) === '[object Promise]';
151155
}
152156
},
153157
{
154158
name: 'isMap',
155-
function: function(value) {
159+
function: function isMap(value) {
156160
return ObjectToString(value) === '[object Map]';
157161
}
158162
},
159163
{
160164
name: 'isSet',
161-
function: function(value) {
165+
function: function isSet(value) {
162166
return ObjectToString(value) === '[object Set]';
163167
}
164168
},
165169
{
166170
name: 'isWeakMap',
167-
function: function(value) {
171+
function: function isWeakMap(value) {
168172
return ObjectToString(value) === '[object WeakMap]';
169173
}
170174
},
171175
{
172176
name: 'isWeakSet',
173-
function: function(value) {
177+
function: function isWeakSet(value) {
174178
return ObjectToString(value) === '[object WeakSet]';
175179
}
176180
},
177181
{
178182
name: 'isArrayBuffer',
179-
function: function(value) {
183+
function: function isArrayBuffer(value) {
180184
return ObjectToString(value) === '[object ArrayBuffer]';
181185
}
182186
},
183187
{
184188
name: 'isDataView',
185-
function: function(value) {
189+
function: function isDataView(value) {
186190
return ObjectToString(value) === '[object DataView]';
187191
}
188192
},
189193
{
190194
name: 'isSharedArrayBuffer',
191-
function: function(value) {
195+
function: function isSharedArrayBuffer(value) {
192196
return ObjectToString(value) === '[object SharedArrayBuffer]';
193197
}
194198
},
195199
{
196200
name: 'isAsyncFunction',
197-
function: function(value) {
201+
function: function isAsyncFunction(value) {
198202
return ObjectToString(value) === '[object AsyncFunction]';
199203
}
200204
},
201205
{
202206
name: 'isGeneratorFunction',
203-
function: function(value) {
207+
function: function isGeneratorFunction(value) {
204208
return ObjectToString(value) === '[object GeneratorFunction]';
205209
}
206210
},
207211
{
208212
name: 'isMapIterator',
209-
function: function(value) {
213+
function: function isMapIterator(value) {
210214
return ObjectToString(value) === '[object Map Iterator]';
211215
}
212216
},
213217
{
214218
name: 'isSetIterator',
215-
function: function(value) {
219+
function: function isSetIterator(value) {
216220
return ObjectToString(value) === '[object Set Iterator]';
217221
}
218222
},
219223
{
220224
name: 'isGeneratorObject',
221-
function: function(value) {
225+
function: function isGeneratorObject(value) {
222226
return ObjectToString(value) === '[object Generator]';
223227
}
224228
},
225229
{
226230
name: 'isWebAssemblyCompiledModule',
227-
function: function(value) {
231+
function: function isWebAssemblyCompiledModule(value) {
228232
return ObjectToString(value) === '[object WebAssembly.Module]';
229233
}
230234
},
231235
{
232236
name: 'isNumberObject',
233-
function: function(value) {
237+
function: function isNumberObject(value) {
234238
return checkBoxedPrimitive(value, numberValue);
235239
}
236240
},
237241
{
238242
name: 'isStringObject',
239-
function: function(value) {
243+
function: function isStringObject(value) {
240244
return checkBoxedPrimitive(value, stringValue);
241245
}
242246
},
243247
{
244248
name: 'isBooleanObject',
245-
function: function(value) {
249+
function: function isBooleanObject(value) {
246250
return checkBoxedPrimitive(value, booleanValue);
247251
}
248252
},
249253
{
250254
name: 'isBigIntObject',
251255
supported: supported.BigInt,
252-
function: function(value) {
256+
function: function isBigIntObject(value) {
253257
return checkBoxedPrimitive(value, bigIntValue);
254258
}
255259
},
256260
{
257261
name: 'isSymbolObject',
258262
supported: supported.Symbol,
259-
function: function(value) {
263+
function: function isSymbolObject(value) {
260264
return checkBoxedPrimitive(value, symbolValue);
261265
}
262266
},
263267
{
264268
name: 'isBoxedPrimitive',
265-
function: function(value) {
269+
function: function isBoxedPrimitive(value) {
266270
return (
267271
exports.isNumberObject(value) ||
268272
exports.isStringObject(value) ||
@@ -275,7 +279,7 @@ var methods = [
275279
{
276280
name: 'isAnyArrayBuffer',
277281
supported: supported.Uint8Array,
278-
function: function(value) {
282+
function: function isAnyArrayBuffer(value) {
279283
return (
280284
exports.isArrayBuffer(value) ||
281285
exports.isSharedArrayBuffer(value)

0 commit comments

Comments
 (0)