
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A Javascript library for creating and manipulating immutable objects
objectKind: global namespace
object
object
object
object
object
object
object
object
objectKind: static namespace of shale
object
A function that returns a hashcode for an array. You should never need to call this directly, just call shale.hashcode
Kind: static method of array
Returns: an hashcode for arr
| Param | Description |
|---|---|
| arr | the array to hash |
A function that compacts an array into an immutable representation. You should never need to call this directly, just call shale.compact
Kind: static method of array
Returns: an immutable representation of arr
| Param | Description |
|---|---|
| arr | the array to compact |
A function that compares two arrays for deep equality. You should never call this directly, use shale.equals
Kind: static method of array
Returns: true if arr1 is equal to arr2, false otherwise
| Param | Description |
|---|---|
| arr1 | an array to compare |
| arr2 | an array to compare |
A function that slices an array or an immutable array. This doesn't modify the source array.
Kind: static method of array
Returns: an immutable slice of val
| Param | Description |
|---|---|
| arr | the array or immutable array to slice |
| begin | the beginning index |
| end | the ending index |
A function that pushes any number of elements onto an array or an immutable array. This doesn't modify the source array.
Kind: static method of array
Returns: an immutable array equivalent to [ ...arr, ...elements ]
| Param | Description |
|---|---|
| arr | the array or immutable array to 'push' onto |
| ...elements | any number of elements to push onto the end of the arr |
| end | the ending index |
A function that 'pops' one element off the source array. This doesn't modify the source array, it returns an immutable copy of the array, minus the last element.
Kind: static method of array
Returns: an immutable array that is a copy of arr, with the last element removed
| Param | Description |
|---|---|
| arr | the array or immutable array to 'pop' |
A function that maps every element of an array to a new array using a mapping function. This is equivalent to array.map, but the returned array is immutable
Kind: static method of array
Returns: an immutable array that is a mapped copy of the original
| Param | Description |
|---|---|
| arr | the array to map |
| func | the mapping function |
A function that filters elements from an array using a filter function. This is equivalent to array.filter, but the returned array is immutable
Kind: static method of array
Returns: an immutable array that is a filter copy of the original
| Param | Description |
|---|---|
| arr | the array to filter |
| func | the filter function |
A function that sorts an array or an immutable array. This doesn't modify the original array, but returns an immutable sorted copy.
Kind: static method of array
Returns: an immutable array that is a sorted immutable copy of the original
| Param | Description |
|---|---|
| arr | the array to filter |
| func | the sorting function |
objectKind: static namespace of shale
object
A function that returns a hashcode for a boolean. You should never need to call this directly, just call shale.hashcode
Kind: static method of boolean
Returns: an hashcode for val
| Param | Description |
|---|---|
| val | the boolean to hash |
A function that compacts a boolean into an immutable representation. You should never need to call this directly, just call shale.compact
Kind: static method of boolean
Returns: an immutable representation of val
| Param | Description |
|---|---|
| val | the boolean to compact |
A function that compares two booleans for equality. You should never call this directly, use shale.equals
Kind: static method of boolean
Returns: true if val1 is equal to val2, false otherwise
| Param | Description |
|---|---|
| val1 | a boolean to compare |
| val2 | a boolean to compare |
objectKind: static namespace of shale
object
A function that returns a hashcode for a null. You should never need to call this directly, just call shale.hashcode
Kind: static method of null
Returns: an hashcode for val
| Param | Description |
|---|---|
| val | the null to hash |
A function that compacts a null into an immutable representation. You should never need to call this directly, just call shale.compact
Kind: static method of null
Returns: an immutable representation of val
| Param | Description |
|---|---|
| val | the null to compact |
A function that compares two nulls for equality. You should never call this directly, use shale.equals
Kind: static method of null
Returns: true if val1 is equal to val2, false otherwise
| Param | Description |
|---|---|
| val1 | a null to compare |
| val2 | a null to compare |
objectKind: static namespace of shale
object
A function that returns a hashcode for a number. You should never need to call this directly, just call shale.hashcode
Kind: static method of number
Returns: an hashcode for val
| Param | Description |
|---|---|
| val | the number to hash |
A function that compacts a number into an immutable representation. You should never need to call this directly, just call shale.compact
Kind: static method of number
Returns: an immutable representation of val
| Param | Description |
|---|---|
| val | the number to compact |
A function that compares two numbers for equality. You should never call this directly, use shale.equals
Kind: static method of number
Returns: true if val1 is equal to val2, false otherwise
| Param | Description |
|---|---|
| val1 | a number to compare |
| val2 | a number to compare |
objectKind: static namespace of shale
object
A function that returns a hashcode for an object. You should never need to call this directly, just call shale.hashcode
Kind: static method of object
Returns: an hashcode for val
| Param | Description |
|---|---|
| val | the object to hash |
A function that compacts an object into an immutable representation. You should never need to call this directly, just call shale.compact
Kind: static method of object
Returns: an immutable representation of val
| Param | Description |
|---|---|
| val | the object to compact |
A function that compares two objects for deep equality. You should never call this directly, use shale.equals
Kind: static method of object
Returns: true if val1 is equal to val2, false otherwise
| Param | Description |
|---|---|
| val1 | an object to compare |
| val2 | an object to compare |
A function that "patches" one object with others. This works like Object.assign, but without modifying the target object
Kind: static method of object
Returns: an immutable representation of the patched target
| Param | Description |
|---|---|
| target | the target object to "patch" |
| ...sources | any number of source objects to patch target with |
A function that returns a "filtered" copy of an object. This works like array.filter, but on each key-value pair of the object
Kind: static method of object
Returns: a filtered representation of obj
| Param | Description |
|---|---|
| obj | the target object to "filter" |
| filter | a filtering function (value, key, obj) => boolean |
A function that returns a "mapped" copy of an object. This works like array.map, but on each key-value pair of the object
Kind: static method of object
Returns: a mapped representation of obj
| Param | Description |
|---|---|
| obj | the target object to "map" |
| ma | a mapping function (value, key, obj) => newValue |
objectKind: static namespace of shale
object
A function that returns a hashcode for a string. You should never need to call this directly, just call shale.hashcode
Kind: static method of string
Returns: an hashcode for val
| Param | Description |
|---|---|
| val | the string to hash |
A function that compacts a string into an immutable representation. You should never need to call this directly, just call shale.compact
Kind: static method of string
Returns: an immutable representation of val
| Param | Description |
|---|---|
| val | the string to compact |
A function that compares two strings for equality. You should never call this directly, use shale.equals
Kind: static method of string
Returns: true if val1 is equal to val2, false otherwise
| Param | Description |
|---|---|
| val1 | a string to compare |
| val2 | a string to compare |
objectKind: static namespace of shale
object
A function that returns a hashcode for an undefined. You should never need to call this directly, just call shale.hashcode
Kind: static method of undefined
Returns: an hashcode for val
| Param | Description |
|---|---|
| val | the undefined to hash |
A function that compacts an undefined into an immutable representation. You should never need to call this directly, just call shale.compact
Kind: static method of undefined
Returns: an immutable representation of val
| Param | Description |
|---|---|
| val | the undefined to compact |
A function that compares two undefineds for equality. You should never call this directly, use shale.equals
Kind: static method of undefined
Returns: true if val1 is equal to val2, false otherwise
| Param | Description |
|---|---|
| val1 | an undefined to compare |
| val2 | an undefined null to compare |
A function that returns the type of a value
Kind: static constant of shale
Returns: a type string
| Param | Description |
|---|---|
| val | the value to check |
A function that returns the shale hashcode of a value
Kind: static method of shale
Returns: a 32-bit hashcode
| Param | Description |
|---|---|
| val | the value to check |
A function that compacts a value into an immutable representation
Kind: static method of shale
Returns: an immutable representation of val
| Param | Description |
|---|---|
| val | the value to compact |
A function that checks if two values are equal
Kind: static method of shale
Returns: a boolean, true if val1 is equal to val2
| Param | Description |
|---|---|
| val1 | a value to compare |
| val2 | a value to compare |
FAQs
A Javascript library for creating and manipulating immutable objects
We found that shale 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.