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

@raknax/extended.js

v1.2.1

Published

A great module that assigns property to arrays and Object global object, briefly expanding NodeJS.

Readme

Extended.JS

A great module that assigns property to arrays and Object global object, briefly expanding NodeJS.

About

This module will come with the function assigned to 13 Array prototypes and the function assigned to 9 Object global object.

Installation

NodeJS 12.0.0 or newer is required.

npm install @raknax/extended.js

Usage

Let's do the function assignments first with this:

const extendedJS = require('@raknax/extended.js')
new extendedJS()

Examples

var arr = new Array("foo", "bar", "x", "y", "z")
var arr2 = new Array("a", "b", "c", "b", "c")
var arr3 = new Array("foo", "bar", "z")
var arr4 = new Array("foo", "bar", "x", "y", "z")
var arr5 = new Array(2, 3, 8, 5, 6)

arr.shuffle() // -> ["bar", "foo", "y", "z", "x"]
arr.random() // -> "y"
arr2.getUnique() // -> ["a", "b", "c"]
arr.toObject() // -> { 0: "foo", 1: "bar", 2: "x", ... }
arr.clear() // -> []
arr.diff(arr3) // -> ["x", "y"]
arr.equal(arr3) // -> false
arr.equal(arr4) // -> true
arr.removeByIndex(1) // -> ["foo", "x", "y", "z"]
arr.removeByIndexes(0, 2) // -> ["bar", "y", "z"]
arr.removeByValue("x") // -> ["foo", "bar", "y", "z"]
arr.removeByValues("x", "y", "z") // -> ["foo", "bar"]
arr.editByIndex(0, "hello") // -> ["hello", "bar", "x", "y", "z"]
arr.editByValue("bar", "world") // -> ["hello", "world", "x", "y", "z"]
arr5.max() // -> 8
arr5.min() // -> 2
arr.pushByIndex(1, "hi!") // -> ["foo", "hi!", "bar", "x", "y", "z"]

// ------- \\

var obj = new Object({ "a": "b", "c": "d", "e": "f" })
var obj2 = new Object({ "a": "b", "foo": "bar" })

Object.removeKey(obj, "c") // -> { a: "b", e: "f" }
Object.removeKeys(obj, ["a", "e"]) // -> { c: "d" }
Object.toArray(obj) // -> [["a", "b"], ["c", "d"], ["e", "f"]]
Object.clear(obj) // -> {}
Object.equal(obj, obj2) // -> false
Object.isObject(obj) // -> true
Object.isObject(arr) // -> false
Object.random(obj) // -> "d"
Object.first(obj) // -> "b"
Object.last(obj) // -> "f"