@withonevision/array-helper@1.2.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
A small collection of extra methods for arrays that we mostly needed from LoDash and Underscore that we didn't want to carry the weight of those installs.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
5 months ago (1.2.0)
Array Helper
A small collection of extra methods for arrays that we mostly needed from LoDash and Underscore that we didn't want to carry the weight of those installs.
Methods
orderBy
Take in an array of keys and orders and re-order the entire array based on that input.
import { orderBy } from "@withonevision/array-helpers"; const array = [{ key1: "Hello" }, { key1: "Goodbye" }]; orderBy(array, ["key1"], ["asc"]); // [{key1: "Goodbye"}, {key1: "Hello"}]
uniqBy
Return the unique values in an array based off of a key.
const array = [{ key1: "Hello" }, { key1: "Goodbye" }, { key1: "Hello" }]; uniqBy(array, "key1"); // [{key1: "Hello"}, {key1: "Goodbye"}]
For a full list of functions, see the jsr.io documentation
Built and signed on
GitHub Actions
Add Package
deno add jsr:@withonevision/array-helper
Import symbol
import * as array_helper from "@withonevision/array-helper";
Import directly with a jsr specifier
import * as array_helper from "jsr:@withonevision/array-helper";
Add Package
pnpm i jsr:@withonevision/array-helper
pnpm dlx jsr add @withonevision/array-helper
Import symbol
import * as array_helper from "@withonevision/array-helper";
Add Package
yarn add jsr:@withonevision/array-helper
yarn dlx jsr add @withonevision/array-helper
Import symbol
import * as array_helper from "@withonevision/array-helper";
Add Package
npx jsr add @withonevision/array-helper
Import symbol
import * as array_helper from "@withonevision/array-helper";
Add Package
bunx jsr add @withonevision/array-helper
Import symbol
import * as array_helper from "@withonevision/array-helper";