1 | const typedArrayTypeNames = [
|
2 | 'Int8Array',
|
3 | 'Uint8Array',
|
4 | 'Uint8ClampedArray',
|
5 | 'Int16Array',
|
6 | 'Uint16Array',
|
7 | 'Int32Array',
|
8 | 'Uint32Array',
|
9 | 'Float32Array',
|
10 | 'Float64Array',
|
11 | 'BigInt64Array',
|
12 | 'BigUint64Array',
|
13 | ];
|
14 | function isTypedArrayName(name) {
|
15 | return typedArrayTypeNames.includes(name);
|
16 | }
|
17 | const objectTypeNames = [
|
18 | 'Function',
|
19 | 'Generator',
|
20 | 'AsyncGenerator',
|
21 | 'GeneratorFunction',
|
22 | 'AsyncGeneratorFunction',
|
23 | 'AsyncFunction',
|
24 | 'Observable',
|
25 | 'Array',
|
26 | 'Buffer',
|
27 | 'Blob',
|
28 | 'Object',
|
29 | 'RegExp',
|
30 | 'Date',
|
31 | 'Error',
|
32 | 'Map',
|
33 | 'Set',
|
34 | 'WeakMap',
|
35 | 'WeakSet',
|
36 | 'WeakRef',
|
37 | 'ArrayBuffer',
|
38 | 'SharedArrayBuffer',
|
39 | 'DataView',
|
40 | 'Promise',
|
41 | 'URL',
|
42 | 'FormData',
|
43 | 'URLSearchParams',
|
44 | 'HTMLElement',
|
45 | 'NaN',
|
46 | ...typedArrayTypeNames,
|
47 | ];
|
48 | function isObjectTypeName(name) {
|
49 | return objectTypeNames.includes(name);
|
50 | }
|
51 | const primitiveTypeNames = [
|
52 | 'null',
|
53 | 'undefined',
|
54 | 'string',
|
55 | 'number',
|
56 | 'bigint',
|
57 | 'boolean',
|
58 | 'symbol',
|
59 | ];
|
60 | function isPrimitiveTypeName(name) {
|
61 | return primitiveTypeNames.includes(name);
|
62 | }
|
63 |
|
64 | function isOfType(type) {
|
65 | return (value) => typeof value === type;
|
66 | }
|
67 | const { toString } = Object.prototype;
|
68 | const getObjectType = (value) => {
|
69 | const objectTypeName = toString.call(value).slice(8, -1);
|
70 | if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) {
|
71 | return 'HTMLElement';
|
72 | }
|
73 | if (isObjectTypeName(objectTypeName)) {
|
74 | return objectTypeName;
|
75 | }
|
76 | return undefined;
|
77 | };
|
78 | const isObjectOfType = (type) => (value) => getObjectType(value) === type;
|
79 | function is(value) {
|
80 | if (value === null) {
|
81 | return 'null';
|
82 | }
|
83 | switch (typeof value) {
|
84 | case 'undefined':
|
85 | return 'undefined';
|
86 | case 'string':
|
87 | return 'string';
|
88 | case 'number':
|
89 | return Number.isNaN(value) ? 'NaN' : 'number';
|
90 | case 'boolean':
|
91 | return 'boolean';
|
92 | case 'function':
|
93 | return 'Function';
|
94 | case 'bigint':
|
95 | return 'bigint';
|
96 | case 'symbol':
|
97 | return 'symbol';
|
98 | default:
|
99 | }
|
100 | if (is.observable(value)) {
|
101 | return 'Observable';
|
102 | }
|
103 | if (is.array(value)) {
|
104 | return 'Array';
|
105 | }
|
106 | if (is.buffer(value)) {
|
107 | return 'Buffer';
|
108 | }
|
109 | const tagType = getObjectType(value);
|
110 | if (tagType) {
|
111 | return tagType;
|
112 | }
|
113 | if (value instanceof String || value instanceof Boolean || value instanceof Number) {
|
114 | throw new TypeError('Please don\'t use object wrappers for primitive types');
|
115 | }
|
116 | return 'Object';
|
117 | }
|
118 | is.undefined = isOfType('undefined');
|
119 | is.string = isOfType('string');
|
120 | const isNumberType = isOfType('number');
|
121 | is.number = (value) => isNumberType(value) && !is.nan(value);
|
122 | is.bigint = isOfType('bigint');
|
123 |
|
124 | is.function_ = isOfType('function');
|
125 |
|
126 | is.null_ = (value) => value === null;
|
127 | is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
|
128 | is.boolean = (value) => value === true || value === false;
|
129 | is.symbol = isOfType('symbol');
|
130 | is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
|
131 | is.array = (value, assertion) => {
|
132 | if (!Array.isArray(value)) {
|
133 | return false;
|
134 | }
|
135 | if (!is.function_(assertion)) {
|
136 | return true;
|
137 | }
|
138 | return value.every(element => assertion(element));
|
139 | };
|
140 |
|
141 | is.buffer = (value) => value?.constructor?.isBuffer?.(value) ?? false;
|
142 | is.blob = (value) => isObjectOfType('Blob')(value);
|
143 | is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
|
144 | is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value));
|
145 | is.iterable = (value) => is.function_(value?.[Symbol.iterator]);
|
146 | is.asyncIterable = (value) => is.function_(value?.[Symbol.asyncIterator]);
|
147 | is.generator = (value) => is.iterable(value) && is.function_(value?.next) && is.function_(value?.throw);
|
148 | is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw);
|
149 | is.nativePromise = (value) => isObjectOfType('Promise')(value);
|
150 | const hasPromiseApi = (value) => is.function_(value?.then)
|
151 | && is.function_(value?.catch);
|
152 | is.promise = (value) => is.nativePromise(value) || hasPromiseApi(value);
|
153 | is.generatorFunction = isObjectOfType('GeneratorFunction');
|
154 | is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction';
|
155 | is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction';
|
156 |
|
157 | is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
|
158 | is.regExp = isObjectOfType('RegExp');
|
159 | is.date = isObjectOfType('Date');
|
160 | is.error = isObjectOfType('Error');
|
161 | is.map = (value) => isObjectOfType('Map')(value);
|
162 | is.set = (value) => isObjectOfType('Set')(value);
|
163 | is.weakMap = (value) => isObjectOfType('WeakMap')(value);
|
164 | is.weakSet = (value) => isObjectOfType('WeakSet')(value);
|
165 | is.weakRef = (value) => isObjectOfType('WeakRef')(value);
|
166 | is.int8Array = isObjectOfType('Int8Array');
|
167 | is.uint8Array = isObjectOfType('Uint8Array');
|
168 | is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray');
|
169 | is.int16Array = isObjectOfType('Int16Array');
|
170 | is.uint16Array = isObjectOfType('Uint16Array');
|
171 | is.int32Array = isObjectOfType('Int32Array');
|
172 | is.uint32Array = isObjectOfType('Uint32Array');
|
173 | is.float32Array = isObjectOfType('Float32Array');
|
174 | is.float64Array = isObjectOfType('Float64Array');
|
175 | is.bigInt64Array = isObjectOfType('BigInt64Array');
|
176 | is.bigUint64Array = isObjectOfType('BigUint64Array');
|
177 | is.arrayBuffer = isObjectOfType('ArrayBuffer');
|
178 | is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer');
|
179 | is.dataView = isObjectOfType('DataView');
|
180 | is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value);
|
181 | is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
|
182 | is.urlInstance = (value) => isObjectOfType('URL')(value);
|
183 | is.urlString = (value) => {
|
184 | if (!is.string(value)) {
|
185 | return false;
|
186 | }
|
187 | try {
|
188 | new URL(value);
|
189 | return true;
|
190 | }
|
191 | catch {
|
192 | return false;
|
193 | }
|
194 | };
|
195 |
|
196 | is.truthy = (value) => Boolean(value);
|
197 |
|
198 | is.falsy = (value) => !value;
|
199 | is.nan = (value) => Number.isNaN(value);
|
200 | is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value);
|
201 | is.integer = (value) => Number.isInteger(value);
|
202 | is.safeInteger = (value) => Number.isSafeInteger(value);
|
203 | is.plainObject = (value) => {
|
204 |
|
205 | if (typeof value !== 'object' || value === null) {
|
206 | return false;
|
207 | }
|
208 |
|
209 | const prototype = Object.getPrototypeOf(value);
|
210 | return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
211 | };
|
212 | is.typedArray = (value) => isTypedArrayName(getObjectType(value));
|
213 | const isValidLength = (value) => is.safeInteger(value) && value >= 0;
|
214 | is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
|
215 | is.inRange = (value, range) => {
|
216 | if (is.number(range)) {
|
217 | return value >= Math.min(0, range) && value <= Math.max(range, 0);
|
218 | }
|
219 | if (is.array(range) && range.length === 2) {
|
220 | return value >= Math.min(...range) && value <= Math.max(...range);
|
221 | }
|
222 | throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
|
223 | };
|
224 |
|
225 | const NODE_TYPE_ELEMENT = 1;
|
226 |
|
227 | const DOM_PROPERTIES_TO_CHECK = [
|
228 | 'innerHTML',
|
229 | 'ownerDocument',
|
230 | 'style',
|
231 | 'attributes',
|
232 | 'nodeValue',
|
233 | ];
|
234 | is.domElement = (value) => is.object(value)
|
235 | && value.nodeType === NODE_TYPE_ELEMENT
|
236 | && is.string(value.nodeName)
|
237 | && !is.plainObject(value)
|
238 | && DOM_PROPERTIES_TO_CHECK.every(property => property in value);
|
239 | is.observable = (value) => {
|
240 | if (!value) {
|
241 | return false;
|
242 | }
|
243 |
|
244 | if (value === value[Symbol.observable]?.()) {
|
245 | return true;
|
246 | }
|
247 |
|
248 | if (value === value['@@observable']?.()) {
|
249 | return true;
|
250 | }
|
251 | return false;
|
252 | };
|
253 | is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value);
|
254 | is.infinite = (value) => value === Number.POSITIVE_INFINITY || value === Number.NEGATIVE_INFINITY;
|
255 | const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder;
|
256 | is.evenInteger = isAbsoluteMod2(0);
|
257 | is.oddInteger = isAbsoluteMod2(1);
|
258 | is.emptyArray = (value) => is.array(value) && value.length === 0;
|
259 | is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
|
260 | is.emptyString = (value) => is.string(value) && value.length === 0;
|
261 | const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value);
|
262 | is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
|
263 |
|
264 | is.nonEmptyString = (value) => is.string(value) && value.length > 0;
|
265 |
|
266 | is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value);
|
267 |
|
268 | is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
|
269 |
|
270 |
|
271 |
|
272 | is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
|
273 | is.emptySet = (value) => is.set(value) && value.size === 0;
|
274 | is.nonEmptySet = (value) => is.set(value) && value.size > 0;
|
275 |
|
276 | is.emptyMap = (value) => is.map(value) && value.size === 0;
|
277 |
|
278 | is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
|
279 |
|
280 | is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value);
|
281 | is.formData = (value) => isObjectOfType('FormData')(value);
|
282 | is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value);
|
283 | const predicateOnArray = (method, predicate, values) => {
|
284 | if (!is.function_(predicate)) {
|
285 | throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
|
286 | }
|
287 | if (values.length === 0) {
|
288 | throw new TypeError('Invalid number of values');
|
289 | }
|
290 | return method.call(values, predicate);
|
291 | };
|
292 | is.any = (predicate, ...values) => {
|
293 | const predicates = is.array(predicate) ? predicate : [predicate];
|
294 | return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values));
|
295 | };
|
296 | is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
|
297 | const assertType = (condition, description, value, options = {}) => {
|
298 | if (!condition) {
|
299 | const { multipleValues } = options;
|
300 | const valuesMessage = multipleValues
|
301 | ? `received values of types ${[
|
302 | ...new Set(value.map(singleValue => `\`${is(singleValue)}\``)),
|
303 | ].join(', ')}`
|
304 | : `received value of type \`${is(value)}\``;
|
305 | throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`);
|
306 | }
|
307 | };
|
308 |
|
309 | export const assert = {
|
310 |
|
311 | undefined: (value) => assertType(is.undefined(value), 'undefined', value),
|
312 | string: (value) => assertType(is.string(value), 'string', value),
|
313 | number: (value) => assertType(is.number(value), 'number', value),
|
314 | bigint: (value) => assertType(is.bigint(value), 'bigint', value),
|
315 |
|
316 | function_: (value) => assertType(is.function_(value), 'Function', value),
|
317 | null_: (value) => assertType(is.null_(value), 'null', value),
|
318 | class_: (value) => assertType(is.class_(value), "Class" , value),
|
319 | boolean: (value) => assertType(is.boolean(value), 'boolean', value),
|
320 | symbol: (value) => assertType(is.symbol(value), 'symbol', value),
|
321 | numericString: (value) => assertType(is.numericString(value), "string with a number" , value),
|
322 | array: (value, assertion) => {
|
323 | const assert = assertType;
|
324 | assert(is.array(value), 'Array', value);
|
325 | if (assertion) {
|
326 |
|
327 | value.forEach(assertion);
|
328 | }
|
329 | },
|
330 | buffer: (value) => assertType(is.buffer(value), 'Buffer', value),
|
331 | blob: (value) => assertType(is.blob(value), 'Blob', value),
|
332 | nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" , value),
|
333 | object: (value) => assertType(is.object(value), 'Object', value),
|
334 | iterable: (value) => assertType(is.iterable(value), "Iterable" , value),
|
335 | asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" , value),
|
336 | generator: (value) => assertType(is.generator(value), 'Generator', value),
|
337 | asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value),
|
338 | nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" , value),
|
339 | promise: (value) => assertType(is.promise(value), 'Promise', value),
|
340 | generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value),
|
341 | asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value),
|
342 |
|
343 | asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value),
|
344 |
|
345 | boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value),
|
346 | regExp: (value) => assertType(is.regExp(value), 'RegExp', value),
|
347 | date: (value) => assertType(is.date(value), 'Date', value),
|
348 | error: (value) => assertType(is.error(value), 'Error', value),
|
349 | map: (value) => assertType(is.map(value), 'Map', value),
|
350 | set: (value) => assertType(is.set(value), 'Set', value),
|
351 | weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value),
|
352 | weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value),
|
353 | weakRef: (value) => assertType(is.weakRef(value), 'WeakRef', value),
|
354 | int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value),
|
355 | uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value),
|
356 | uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value),
|
357 | int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value),
|
358 | uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value),
|
359 | int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value),
|
360 | uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value),
|
361 | float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value),
|
362 | float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value),
|
363 | bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value),
|
364 | bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value),
|
365 | arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value),
|
366 | sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value),
|
367 | dataView: (value) => assertType(is.dataView(value), 'DataView', value),
|
368 | enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value),
|
369 | urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value),
|
370 | urlString: (value) => assertType(is.urlString(value), "string with a URL" /* AssertionTypeDescription.urlString */, value),
|
371 | truthy: (value) => assertType(is.truthy(value), "truthy" /* AssertionTypeDescription.truthy */, value),
|
372 | falsy: (value) => assertType(is.falsy(value), "falsy" /* AssertionTypeDescription.falsy */, value),
|
373 | nan: (value) => assertType(is.nan(value), "NaN" /* AssertionTypeDescription.nan */, value),
|
374 | primitive: (value) => assertType(is.primitive(value), "primitive" /* AssertionTypeDescription.primitive */, value),
|
375 | integer: (value) => assertType(is.integer(value), "integer" /* AssertionTypeDescription.integer */, value),
|
376 | safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* AssertionTypeDescription.safeInteger */, value),
|
377 | plainObject: (value) => assertType(is.plainObject(value), "plain object" /* AssertionTypeDescription.plainObject */, value),
|
378 | typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* AssertionTypeDescription.typedArray */, value),
|
379 | arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* AssertionTypeDescription.arrayLike */, value),
|
380 | domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* AssertionTypeDescription.domElement */, value),
|
381 | observable: (value) => assertType(is.observable(value), 'Observable', value),
|
382 | nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* AssertionTypeDescription.nodeStream */, value),
|
383 | infinite: (value) => assertType(is.infinite(value), "infinite number" /* AssertionTypeDescription.infinite */, value),
|
384 | emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* AssertionTypeDescription.emptyArray */, value),
|
385 | nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* AssertionTypeDescription.nonEmptyArray */, value),
|
386 | emptyString: (value) => assertType(is.emptyString(value), "empty string" /* AssertionTypeDescription.emptyString */, value),
|
387 | emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* AssertionTypeDescription.emptyStringOrWhitespace */, value),
|
388 | nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* AssertionTypeDescription.nonEmptyString */, value),
|
389 | nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* AssertionTypeDescription.nonEmptyStringAndNotWhitespace */, value),
|
390 | emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* AssertionTypeDescription.emptyObject */, value),
|
391 | nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* AssertionTypeDescription.nonEmptyObject */, value),
|
392 | emptySet: (value) => assertType(is.emptySet(value), "empty set" /* AssertionTypeDescription.emptySet */, value),
|
393 | nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* AssertionTypeDescription.nonEmptySet */, value),
|
394 | emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* AssertionTypeDescription.emptyMap */, value),
|
395 | nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* AssertionTypeDescription.nonEmptyMap */, value),
|
396 | propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value),
|
397 | formData: (value) => assertType(is.formData(value), 'FormData', value),
|
398 | urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value),
|
399 | // Numbers.
|
400 | evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* AssertionTypeDescription.evenInteger */, value),
|
401 | oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* AssertionTypeDescription.oddInteger */, value),
|
402 | // Two arguments.
|
403 | directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* AssertionTypeDescription.directInstanceOf */, instance),
|
404 | inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* AssertionTypeDescription.inRange */, value),
|
405 | // Variadic functions.
|
406 | any: (predicate, ...values) => assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* AssertionTypeDescription.any */, values, { multipleValues: true }),
|
407 | all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" , values, { multipleValues: true }),
|
408 | };
|
409 |
|
410 |
|
411 |
|
412 | Object.defineProperties(is, {
|
413 | class: {
|
414 | value: is.class_,
|
415 | },
|
416 | function: {
|
417 | value: is.function_,
|
418 | },
|
419 | null: {
|
420 | value: is.null_,
|
421 | },
|
422 | });
|
423 | Object.defineProperties(assert, {
|
424 | class: {
|
425 | value: assert.class_,
|
426 | },
|
427 | function: {
|
428 | value: assert.function_,
|
429 | },
|
430 | null: {
|
431 | value: assert.null_,
|
432 | },
|
433 | });
|
434 | export default is;
|