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

tsl-utils

v1.0.34

Published

Collection of Lodash like utilities

Downloads

8

Readme

  • Objects

    • pickFirstObjectItem — Retrives first element from array value of object keys, used in combination with groupBy from lodash, groupBy returns grouped values from array with provided key in callback. If key is unique array will have one value. This can be used to take out that value
    • renameKeys — Update object keys with callback.
    • objectMap — Mapping through object keys and return object with updated values
    • objectLoop — Looping through object, same as forEach though you get index as 3rd parameter in callback
    • objectFilter — Mapping through object keys and returns new filtered object
    • cleanObject — Mapping through object keys and removing undefined values
    • swapObjectData — Mapping through object keys and taking values form second object under same key
    • swapObjectCleanedData — Mapping through object keys and taking values form second object under same key, all undefined values are removed
    • setObjectLeaf — similar to setWith from lodash, though this function returns new object. It takes array of keys and value, it updates object last key with value and if keys do not exist it creates them dynamically
    • getSortedObject — Get object where keys are sorted alphabetically
  • Functions

    • promisifyCallback — Promisify functions that accept callback that will be called upon resolve, example wainting for message from api
  • Selectors

    • generateSelector — Function that generates selector for reselect library
    • combineSelector — Function that allows usage of selector logic outside of reselect
  • Arrays

    • includesAll — Check if all keys from source array are in target array
    • rangeEach — Callback is executed a range number of times
    • rangeMap — Creates a range custom array
    • rangeReduce — Reduces a range array
    • orderedPromiseAll — Return array with all promises resolved in order, one after another
  • Events

    • dispatchEvent — Dispatches custom event
    • addOnHistoryChangeEvent — Disptaches custom event on every history change
  • Api

    • fetchApi — Fetch helper with options for generating query string and prefix, takes custom fetchCallback for usage if node-fetch should be used
  • Browser

    • isBrowser — Detects if code is running in a browser
    • domReady — Runs function when content is rendered
    • addOnHistoryChangeCallback — Calls custom funtion on every history change