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

zengenti-utils

v0.3.0

Published

A collection of utils

Downloads

5

Readme

Utils

This module/repo contains a collection of general utilities.

add(Number, Number)

Example util for testing that this module works, and utils can be imported into external projects. It adds two numbers.

getSymbolDescription(Symbol)

This is used in PublishSubscribe module to get the string value passed into Symbol(string), which should be on the symbol.description property, but it is not in every environment, which is why this function was made.

hasKey(object:Object, key: String)

Returns Boolean, true if key is a key on object, else false.


structure/

The structure/ folder is for development, used as the input folder when utilizing https://www.npmjs.com/package/zengenti-make-component, when defining a new util.


Contribute

TLDR; If you want to add a util to this repository, export it in main.js and then publish with sudo np.

Guidelines:

  1. Install make-component with npm i zengenti-make-component -g (only do this once).

  2. Clone and cd this repository to your local filesystem.

  3. Run this command make-component nameOfUtil src structure and change nameOfUtil to the name of your utility. src is output directory, and structure is input directory.

  4. Paste and export your code from your src/nameOfUtil/nameOfUtil.js file.

  5. Additionally, paste any existing test code, or write some new test code in the .test.js file. This uses mocha which should be sufficient for utils.

  6. Add info about your util to the README.md file

  7. export your util in main.js to expose it for use in external code which imports our 'zengenti-utils' module.

  8. npm i to install the repo, and then npm run test to run the tests. Check that they all pass before proceeding, else fix the issue.

  9. Kindly ask a colleague to review the changes / code, and push this to the remote git repo.

  10. Publish the module zengenti-utils using sudo np (see np on github)

TODO

  • Automate adding a new component more, so that it adds the import/export to main.js and makes an entry in README.md