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 🙏

© 2024 – Pkg Stats / Ryan Hefner

data-manipulation-library

v1.0.0

Published

a libary for data manipulation in js

Downloads

1

Readme

Data manipulation library made by Buntcz, inspired by lodash,

Array Utilities Mehtods to manipulate arrays.

  1. chunk(array, parts), array => pass in the array you want to use, parts => pass in the parts you want your array be sliced in example: if you have array with legnth of 8, and you pass parts = 2, it will return 4 arrays with length 2.
  2. flatten(nestedArray) after you pass a nested array it returns a normal array, however this works only for 2D arays for now. 3D array coming.
  3. uni1(array) , it works like Set, but it returns an actual array, after you pass in an array it removes all duplicates.
  4. zip(...arrays) after you pass in all arrays you need it zips the array elements with the same indexes example : if you pass in these 2 arrays [a,b,c] and [1,2,3] it will return [1,a],[2,b],[3,c]

Objects Utililites Methods to manipulate objects

  1. merge(object,...sources), after you pass in an object and in sources you can pass as much keys as you want, it will merge the object with the keys and return a brand new object.
  2. omit(object, ...keys), after you pass in an object and the keys, it will remove all the keys that you called in the object, returning and object without the called keys.
  3. pick(object, ...keys), just returns the keys you called from the object, if they are present in the object, if not returns

String Utilies Methods to manipulate strings

  1. camelCase(string), returns the string in Camel Case ex: Cheese Burger => cheeseBurger
  2. kebabCase(string), returns the string in Kebab Case ex: Cheese Burget => cheese-burger
  3. capitalize(string), return the string with its first letter capitalized ex: cheese Burger => Cheese Burger

Function Utilites 2 Methods of delayed call of a function

  1. debounce(func,wait) , in func pass in the function in the wait the delay you want your function to start. !!! In debounce the function is called only once after the delay has passed, example: if you pass a function that prints hello world, and a 2 second delay, it will console log hello world only once after 2 seconds

  2. throttle(func,wait), debounce(func,wait) , in func pass in the function in the wait pass the delay you want your Intervals to pass to start the function, !!! In throttle the function starts every time the delay passes, example: if you pass a function that prints hello world, and a 2 second delay, it will console log hello every 2 seconds.

General Utilities Methods to clone and compare objects.

  1. cloneDeep(value), deepClones the object passed.
  2. isEqual(value,otherValue), compares the 2 objects given, each key of the 1st valus is compared with each key of the 2nd value.

That was for my first ever library, I know it's not the best but for a first time I think it's great. Thanks for checking it out.