![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
array-sorting-utilities
Advanced tools
Dependency-free utility functions for efficiently managing sorted arrays
Dependency-free utility functions for efficiently managing sorted arrays.
This package exists primarily in support of the suspense
package, though it may be useful in other contexts.
# NPM
npm install array-sorting-utilities
# Yarn
yarn add array-sorting-utilities
Configure the utility to compare values of a specific type. For example...
To compare values with numeric ids/keys:
import { configure } from "point-utilities";
const utils = configure<number>((a: Object, b: Object) => a.key - b.key);
To compare values with string ids/keys:
import { configure } from "point-utilities";
const utils = configure<number>((a: Object, b: Object) => a.key.localeCompare(b));
find(sortedItems: Value[], targetItem: Value): Value | null
If an item matching the one specified can be found the array, this value will return it. Else it will return null.
findIndex(sortedItems: Value[], targetItem: Value, exactMatch?: boolean): number
Returns the index of an item matching the one specified (or -1 if no match is found).
By default, exactMatch
is true. Setting this parameter to false will return the index of the closest match.
findInsertIndex(sortedItems: Value[], item: Value): number
Returns the insertion index for the specified value.
insert(sortedItems: Value[], item: Value): Value[]
Inserts a value.
FAQs
Dependency-free utility functions for efficiently managing sorted arrays
The npm package array-sorting-utilities receives a total of 105 weekly downloads. As such, array-sorting-utilities popularity was classified as not popular.
We found that array-sorting-utilities 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
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.