npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dwtechs/sparray

v0.2.1

Published

Open source arrays toolkit library for Javascript.

Downloads

95

Readme

License: MIT npm version last version release date Jest:coverage minified size

Synopsis

Sparray.js is an Open source arrays toolkit library for Javascript.

  • Only 1 small dependency to check inputs variables
  • Very lightweight
  • Thoroughly tested
  • Works in Javascript, Typescript and Node.js
  • Can be used as CommonJS or EcmaScrypt module
  • Written in Typescript

Support

  • node: 14

This is the oldest targeted versions. The library should work properly on older versions of Node.js but we do not support it officially.

Installation

$ npm i @dwtechs/sparray

Usage

ES6 / TypeScript

import { chunk } from "@dwtechs/sparray";

function chunkArray(req, res, next) {
  req.chunks = chunk(req.body.rows, null);
  next();
}

export {
  chunkArray,
};

CommonJS


const sp = require("@dwtechs/sparray");

function chunk(req, res, next) {
  req.chunks = sp.chunk(req.body.rows, null);
  next();
}

module.exports = {
  chunk,
};

API Reference


let chunkSize = 100 //Default value

/**
 * Gets the chunk size for the `chunk` function.
 *
 * @return {number} The current chunk size.
 */
getChunkSize(): number {}

/**
 * Sets the chunk size for the `chunk` function.
 *
 * @param {number} size - The number of elements to include in each chunk.
 * @return {number} The new chunk size.
 */
setChunkSize(size: number): number {}

/**
 * Inserts an element into an array at a specified index.
 *
 * @param {unknown[]} a - The array to modify.
 * @param {unknown} prop - The element to insert into the array.
 * @param {number} start - The index at which to insert the element.
 * @returns {unknown[]} The modified array after the insertion.
 */
add(a: unknown[], prop: unknown, start: number): unknown[];

/**
 * Creates chunks of data from a given array of rows.
 *
 * @param {Array} rows - The array to be chunked.
 * @param {number} count - The number of rows in the array.
 * @return {Array} An array of chunked arrays.
 */
chunk(rows: any[], size?: number = chunkSize): any[] {}

/**
 * Returns an array of elements that are common to both input arrays.
 *
 * @param {Array} a - The first array to compare.
 * @param {Array} b - The second array to compare.
 * @return {Array} An array of elements that exist in both input arrays.
 */
getCommonValues(a: any[], b: any[]): any[] {}

/**
 * Checks if there are common values between two arrays.
 *
 * @param {Array} a - The first array to compare.
 * @param {Array} b - The second array to compare.
 * @return {boolean} True if there are common values, otherwise false.
 */
checkCommonValues(a: any[], b: any[]): boolean {}

/**
 * Flatten chunks.
 *
 * @param {Array} chunks - The array of chunks to be flattened.
 * @return {Array} The flattened array.
 */
flatten(chunks: any[]): any[] {}

/**
 * Deletes specified properties from each object in an array.
 *
 * @param {Array} arr - The array of objects.
 * @param {Array} props - The properties to delete.
 * @return {Array} The modified array.
 */
deleteProps(arr: Record<string, any>[], props: string[]): Record<string, any>[] {}

Contributors

Sparray.js is still in development and we would be glad to get all the help you can provide. To contribute please read contributor.md for detailed installation guide.

Stack

| Purpose | Choice | Motivation | | :-------------- | :------------------------------------------: | -------------------------------------------------------------: | | repository | Github | hosting for software development version control using Git | | package manager | npm | default node.js package manager | | language | TypeScript | static type checking along with the latest ECMAScript features | | module bundler | Rollup | advanced module bundler for ES6 modules | | unit testing | Jest | delightful testing with a focus on simplicity |