English | 简体中文
A collection of JavaScript/TypeScript utility tools
- Zero dependency
- Tree Shakable
- Version >= 16.0.0
- ESM Project
npm install @13onthecode/utils --save-dev
import { mergeObject } from '@13onthecode/utils'
const foo = {
foo: 'foo',
other: {
foo: 'foo'
}
}
const bar = {
bar: 'bar',
other: {
bar: 'bar'
}
}
const merged = mergeObject(foo, bar)
// => {
// foo: "foo"
// bar: "bar"
// other: {
// bar: 'bar'
// }
// }
const deepMerged = mergeObject(foo, bar, { mode: 'deep' })
// => {
// foo: "foo"
// bar: "bar"
// other: {
// foo: "foo"
// bar: "bar"
// }
// }
isArray
isArrayBuffer
isArrayBufferView
isAsyncFunction
isAsyncIterable
isBigInt
isBigInt64Array
isBigUint64Array
isBlob
isBoolean
isDataView
isDate
isEmptyArray
isEmptyMap
isEmptyObject
isEmptySet
isEmptyString
isError
isFalse
isFile
isFloat32Array
isFloat64Array
isFormData
isFunction
isInfiniteNumber
isInt8Array
isInt16Array
isInt32Array
isIterable
isMap
isModule
isNaN
isNegativeNumber
isNonEmptyArray
isNonEmptyMap
isNonEmptyObject
isNonEmptySet
isNonEmptyString
isNonNullable
isNull
isNullable
isNumber
isObject
isPositiveNumber
isPrimitive
isPromise
isReadableStream
isRegExp
isSet
isString
isSymbol
isTrue
isTypedArray
isUint8Array
isUint8ClampedArray
isUint16Array
isUint32Array
isUndefined
isURLSearchParams
isWeakMap
isWeakRef
isWeakSet
camelCase
capitalCase
capitalize
customCase
isLowerCase
isUpperCase
kebabCase
pascalCase
snakeCase
spaceCase
unCapitalize
MIT License © 2023-PRESENT 13OnTheCode