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

sloadash

v2.1.6

Published

A set of loadash-like utilities in TypeScript.

Downloads

530

Readme

Custom Lodash-like Utility Functions This project provides a set of utility functions that replicate some common methods found in the Lodash library. These functions aim to simplify everyday tasks such as cloning objects, deep merging arrays, and handling collections, but without requiring a full Lodash library.

Functions Here is a brief description of each function included in this package:

Functions

| Function Name | Description | Example Usage | |------------------|---------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------| | cloneDeep | Deeply clones an object or array, ensuring all nested properties are copied. | cloneDeep({a: {b: 1}}); | | once | Returns a function that is only invoked once, no matter how many times it is called. | const func = once(() => console.log('Called')); | | get | Retrieves the value at a given path of an object, safely handling undefined paths. | get(obj, 'a.b.c'); | | concat | Concatenates multiple arrays into a single array. | concat([1, 2], [3, 4]); | | difference | Returns an array of values that are present in the first array but not in the subsequent arrays. | difference([1, 2, 3], [3, 4]); | | drop | Returns a new array with the first n elements removed. | drop([1, 2, 3], 2); | | fill | Fills an array with a specific value between start and end indexes. | fill([1, 2, 3], 0, 2); | | flattenDeep | Flattens a deeply nested array into a single level array. | flattenDeep([1, [2, [3, [4]]]]); | | head | Returns the first element of an array. | head([1, 2, 3]); | | initial | Returns a new array excluding the last element. | initial([1, 2, 3]); | | intersection | Returns an array of values that are present in all provided arrays. | intersection([1, 2], [2, 3]); | | join | Joins the elements of an array into a string, separated by a specified separator. | join([1, 2, 3], ','); | | findIndex | Finds the index of the first element in an array that satisfies the provided predicate function. | findIndex([1, 2, 3], x => x === 2); | | reverse | Reverses the order of the elements in an array. | reverse([1, 2, 3]); | | tail | Returns a new array excluding the first element. | tail([1, 2, 3]); | | union | Combines multiple arrays into a single array, removing duplicate elements. | union([1, 2], [2, 3], [3, 4]); | | pull | Removes all instances of the given values from an array. | pull([1, 2, 3, 4, 5], 2, 4); |