![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
lutils
✓ TypesSript documented
import { typeOf, merge, clone } from 'lutils'
Merge objects together, traversing objects & arrays recursively
merge(subject, ...sources[])
=> subject
10
import { merge } from 'lutils'
merge({ aa: { cc: 1 }, }, { aa: { cc: 2 } }, { bb: 3 })
=== { aa: { cc: 2 }, bb: 3 }
Construct & configure your own Merge
instance
new Merge(config).merge
import { Merge } from 'lutils'
const merge = new Merge({ depth: Infinity }).merge
merge(megaDeep, ultraDeep)
Merge, but with two common behaviours, whitelisting and blacklisting
merge.white(subject, ...sources[])
=> subject
merge.black(subject, ...sources[])
=> subject
import { merge } from 'lutils'
merge.white({ aa: { bb: 1, cc: 1 } }, { aa: { xx: 2, cc: 2 } })
=== { aa: { bb: 1, cc: 2 } }
merge.black({ aa: { bb: 1, cc: 1 } }, { aa: { xx: 2, cc: 2 } })
=== { aa: { bb: 1, cc: 1, xx: 2 } }
Clones objects & arrays recursively
clone(subject)
=> clonedSubject
10
import { clone } from 'lutils'
const cloned = clone({ my: { little: { foo: 'bar' } } })
new Clone(config).clone
import { Clone } from 'lutils'
const clone = new Clone({ depth: Infinity }).clone
const cloned = clone({ my: { little: { foo: 'bar' } } })
Gets the type of a value as a lowercase string.
Like the built-in typeof
, but works for all primitives.
typeOf(value)
=> string
import { typeOf } from 'lutils'
typeOf(null)
=== 'null'
typeOf(NaN)
=== 'nan'
typeOf([])
=== 'array'
Specific type checkers are also exported and attached to typeOf
These checkers also supply typescript with type information, meaning
they can act a type guards.
isBoolean(value)
=> boolean
is<type>(value)
=> boolean
import { typeOf, isBoolean, isString } from 'lutils'
typeOf.isNull(null)
=== true
isString(undefined)
=== false
typeOf.isString('')
=== true
isBoolean(false)
=== true
// Type guarding...
function blah (aa: number|string) {
if (isString(aa)) {
// string
aa += '!!!!'
} else {
// number
++aa
}
return aa
}
FAQs
A few reliable utils.
The npm package lutils receives a total of 2,120 weekly downloads. As such, lutils popularity was classified as popular.
We found that lutils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.