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

smiley-id

v1.0.2

Published

Unique id and OTP generator

Downloads

1

Readme

Smiley ID

A tiny, secure, URL-friendly, unique string ID generator for JavaScript.

“Everything might not be perfect, we still hope smileyId will put a 😊”

  • Short IDs. It uses larger alphanumeric and symbols than UUID and nanoid (A-Za-z0-9-^_~#$%&*).
  • Unique😊 So our smileyIds are having way larger pull and a unique smiley seperator.
  • UUID/nanoid If you still like UUID and nanoid formats to have along with smiley, we did that too.
  • OTP If you need OTPs of upto 15 digits, smiley can provide that too.

Smiley id is of length 16 which includes 3 smiley seperators which makes it string of 25 length.

const smiley = require('smiley-id');
const smileyId = smiley.smileyId() //=> "kFpO^-^J#SO^-^36mr^-^OHg~"

OTPs are of length 6 bydefault if length of OTP is not passed otherwise it can return OTP of upto 15 digits.

const smiley = require('smiley-id');
const otp1 = smiley.otp() //=> "934496"
const otp2 = smiley.otp(4) //=> "0652"
const otp3 = smiley.smileyId('otp') //=> "934496"
const otp4 = smiley.smileyId('otp', 8) //=> "12345678"

nanoid are of length 21 bydefault inspired by the actual nanoid project, if length of nanoid is not passed otherwise it returns nanoid of given length.

const smiley = require('smiley-id');
const nanoid1 = smiley.nanoid() //=> "9lWVCogGENuLR9mX4_DDO"
const nanoid2 = smiley.nanoid(10) //=> "SXhjb-LECH"
const nanoid3 = smiley.smileyId('nanoid') //=> "9lWVCogGENuLR9mX4_DDO"
const nanoid4 = smiley.smileyId('nanoid',10) //=> "SXhjb-LECH"

uuid are of length 32 inspired by the actual uuid project. It is seperated into 8-4-4-4-12 using hexadecimal characters. length of 36 if we consider 4 hyphons.

const smiley = require('smiley-id');
const nanoid1 = smiley.uuid() //=> "c16a90a5-a5f2-ca29-f5d4-82934e67fca5"
const nanoid3 = smiley.smileyId('uuid') //=> "c16a90a5-a5f2-ca29-f5d4-82934e67fca5"