object-array-utils
Advanced tools
+2
-2
| export type PlainObject<T = unknown> = Record<string, T>; | ||
| export type Primitive = string | number | bigint | boolean | symbol | null | undefined; | ||
| declare function isPrimitive(v: unknown): v is Primitive; | ||
| declare function isNullOrUndefined(v: unknown): v is null | undefined; | ||
| declare function isNullish(v: unknown): v is null | undefined; | ||
| declare function isPrimitiveWrapper(o: unknown): o is Number | String | Boolean; | ||
@@ -78,2 +78,2 @@ type Unboxed<T> = T extends Number ? number : T extends String ? string : T extends Boolean ? boolean : T; | ||
| declare function makeCopyOnWriteObjectSetter<T extends PlainObject>(base: T): <K extends keyof T>(key: K, value: T[K]) => T; | ||
| export { areArraysEqual, arePlainObjectsEqual, areDataEqual, deepClonePlain, deepFreezePlain, differencePrimitives, repeat, pickProperties, hasProperty, hasProperties, isArraySubset, isArrayWhereEvery, isEmptyArray, isEmptyPlainObject, isNullOrUndefined, isPlainObject, isPlainObjectWhereEvery, isPlainObjectSubset, isPrimitive, isPrimitiveWrapper, range, omitProperties, removeArrayElement, removeArrayElementByIndex, removeArrayElements, toSortedObject, unboxPrimitiveWrapper, partitionProperties, unique, makeCopyOnWriteObjectSetter, }; | ||
| export { areArraysEqual, arePlainObjectsEqual, areDataEqual, deepClonePlain, deepFreezePlain, differencePrimitives, repeat, pickProperties, hasProperty, hasProperties, isArraySubset, isArrayWhereEvery, isEmptyArray, isEmptyPlainObject, isNullish, isPlainObject, isPlainObjectWhereEvery, isPlainObjectSubset, isPrimitive, isPrimitiveWrapper, range, omitProperties, removeArrayElement, removeArrayElementByIndex, removeArrayElements, toSortedObject, unboxPrimitiveWrapper, partitionProperties, unique, makeCopyOnWriteObjectSetter, }; |
+2
-2
| function isPrimitive(v) { | ||
| return v == null || (typeof v !== 'object' && typeof v !== 'function'); | ||
| } | ||
| function isNullOrUndefined(v) { | ||
| function isNullish(v) { | ||
| return v == null; // matches both null and undefined | ||
@@ -446,2 +446,2 @@ } | ||
| } | ||
| export { areArraysEqual, arePlainObjectsEqual, areDataEqual, deepClonePlain, deepFreezePlain, differencePrimitives, repeat, pickProperties, hasProperty, hasProperties, isArraySubset, isArrayWhereEvery, isEmptyArray, isEmptyPlainObject, isNullOrUndefined, isPlainObject, isPlainObjectWhereEvery, isPlainObjectSubset, isPrimitive, isPrimitiveWrapper, range, omitProperties, removeArrayElement, removeArrayElementByIndex, removeArrayElements, toSortedObject, unboxPrimitiveWrapper, partitionProperties, unique, makeCopyOnWriteObjectSetter, }; | ||
| export { areArraysEqual, arePlainObjectsEqual, areDataEqual, deepClonePlain, deepFreezePlain, differencePrimitives, repeat, pickProperties, hasProperty, hasProperties, isArraySubset, isArrayWhereEvery, isEmptyArray, isEmptyPlainObject, isNullish, isPlainObject, isPlainObjectWhereEvery, isPlainObjectSubset, isPrimitive, isPrimitiveWrapper, range, omitProperties, removeArrayElement, removeArrayElementByIndex, removeArrayElements, toSortedObject, unboxPrimitiveWrapper, partitionProperties, unique, makeCopyOnWriteObjectSetter, }; |
+1
-1
| { | ||
| "name": "object-array-utils", | ||
| "version": "5.1.0", | ||
| "version": "6.0.0", | ||
| "description": "Utilities for working with arrays and objects", | ||
@@ -5,0 +5,0 @@ "funding": "https://github.com/mathieuprog/object-array-utils?sponsor=1", |
+3
-3
@@ -26,6 +26,6 @@ # `object-array-utils` | ||
| import { isNullOrUndefined } from 'object-array-utils'; | ||
| import { isNullish } from 'object-array-utils'; | ||
| isNullOrUndefined(null) // true | ||
| isNullOrUndefined(undefined) // true | ||
| isNullish(null) // true | ||
| isNullish(undefined) // true | ||
@@ -32,0 +32,0 @@ import { hasProperty } from 'object-array-utils'; |
54266
-0.1%