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

person.utils

v1.4.5

Published

A small-sized utility nodejs library.

Downloads

2

Readme

person.utils

If you find any bugs or have a suggestion, dm __person__#0267 or join this server and go to the #person-utils-support channel on discord

Check the change logs in changelog.md

Installing

npm i person.utils

Methods

Convert markdown to html

let pr = require('person.utils')
console.log(pr.mdToHtml(`
\`\`\`
amogus\`\`\`
## Hello
> Looking at dis text:
~*meow*~ <= what a **cat** usally ***does***
[click me for Google](https://google.com)
![img](https://i.imgur.com/00XnnLF_d.webp?maxwidth=640&shape=thumb&fidelity=medium) 
`)) /* output: <code>amogus</code>
<h2>Hello</h2>

<blockquote>Looking at dis text:</blockquote>
<s><i>meow</i></s> <= what a <b>cat</b> usally <b><i>does</b></i>
<a href='https://google.com'>click me for Google</a>
<img src='https://i.imgur.com/00XnnLF_d.webp?maxwidth=640&shape=thumb&fidelity=medium'>*/
// usage: pr.mdToHtml(md) 

Progress bar

let pr = require('person.utils')
console.log(pr.progressbar(9, 20, '😧', '🥚'))
// output: 😧😧😧😧😧😧😧😧🥚😧😧😧😧😧😧😧😧😧😧😧
// usage: pr.progressbar(percentage, max = 100, stringSymbol = '➖',  percentageSymbol = '⭕' )

Random hexadecimal

let pr = require('person.utils')
console.log(pr.hex()) // output (diffirent output for each call): D518B9 
// usage: pr.hex()

Calculate

let pr = require('person.utils')
console.log(pr.calculate('2**(4/5)+6.5')) // output: 8.241101126592248
// usage: pr.calculate(expression)

HTTP

let pr = require('person.utils') 
//get
pr.http.get('https://example.link',{tr: 5}).then(console.log) // output depends on what you are fetching
// usage: pr.http.get(link, headers = {}) (returns a promise)

// post/put/patch/delete 
pr.http.post('https://another.link', {
  content: 2
}, {
  tok: 2
}).then(console.log) /*
output depends on what you are fetching
pr.http.post(link, headers = {}, body = {}) (returns a promise)
pr.http.patch(link, headers = {}, body = {}) (returns a promise)
pr.http.put(link, headers = {}, body = {}) (returns a promise)
pr.http.delete(link, headers = {}, body = {}) (returns a promise)
*/

Get version of an installed package in your project

let pr = require('person.utils')
console.log(pr.packageVersion('node-fetch')) // output: ^2.6.3
//usage: pr.packageVersion(name)

person.utils version

let pr = require('person.utils')
console.log(pr.version)