isImmutable
isImmutable is a JavaScript function commonly found in utility libraries like Lodash. Its primary purpose is to determine whether a given value is immutable. Immutability refers to the property of an object or value whose state cannot be modified after it is created.
When isImmutable is applied to a primitive value such as a number, string, boolean, null, or undefined,
For complex data structures like arrays and plain objects, isImmutable checks if these structures are "deeply
The function is useful in scenarios where maintaining data integrity is crucial, such as in state management