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 🙏

© 2025 – Pkg Stats / Ryan Hefner

js-easify

v0.2.4

Published

Basic set of helpers to makes backend and frontend javascript easy.

Readme

NodeJs Helper

basic set of helpers to make coding a bit easier

Installation

npm i js-easify

Usage

Array

isDistinct

checks if the value in array is distinct or not. if left empty will validate the entire array for distinct values. isDistinct(any[],string?)

e.g

isDistinct(["foo","bar"]) //true isDistinct(["foo","bar","foo"]) //false isDistinct(["foo","bar","foo"],"bar") //true

removeDuplicate

removes dublicate values from array. removeDuplicate(Array<string>)

e.g

removeDuplicate([1,2,3,2,3,1]) // [1,2,3]

pluck

gets specific values from Array of objects. pluck(Array<Object>,String)

e.g

let data =[ { name:"foo" , id:1},{name:"bar" , id:2 } ] console.log(pluck(data,"name")) // ["foo","bar"]

Object

sort

converts array of objects into an object based on key provided. sort(Array<Object>,String)

e.g

let data=[{ name:"foo" , id:1 },{ name:"bar" , id:2 }]

sort(data,"name") // { foo:{ id:1 , name:"foo" }, bar:{ id:2 , name:"bar" } }

mergeUp

merges child object with the parent object. mergeUp(Object,String)

e.g

let data ={ test:22 , foo:"aas" , val:{ foo:"aa" , bar:"bb" } }

mergeUp(data,"val") // { test: 22, foo: 'aa', bar: 'bb' }

mergeUp(data,"val",false) // { test: 22, foo: 'aas', bar: 'bb' }

exceptObj

return an object without specified properties. exceptObj(Object ,Array<strings> )

e.g

let data = { val1 : "22", val2 : "44" }

console,log( exceptObj( data , [ "val1" ] ) ) // { val2 : "44" }

Int

returnAsInt

return anything as number useful when you dont know the return type and you want out put to be number. returnAsInt(any)

e.g

returnAsInt("44") //44 returnAsInt(44) //44 returnAsInt({}) //1

Url

getParams

Get params from url provided and if left empty will get params from if in dom. used (query-string under the hood) getParams(String)

e.g

let data='example.com?foo=bar'

getParams(data) // { foo : "bar" }

ESM and CJS support

This package supports TreeShanking for esm as well as seprate files for each function so you can use it in backend without bloating your application as well as chose between cjs and esm.

e.g import { exceptObj, returnAsInt } from "js-easify" or const { returnAsInt } = require( "js-easify" )

//Or

e.g import returnAsInt from "js-easify/esm/Int/returnAsInt.js" or const returnAsInt =require("js-easify/cjs/Int/returnAsInt.js")