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

faster-hi-mom

v1.0.0

Published

A blazingly fast JavaScript library to say hi to your mom! forked from hi-mom

Downloads

12

Readme

Hi, mom!

The 10x rockstar JavaScript library to say hi to your mom! forked from hi-mom

Install

yarn

yarn add faster-hi-mom

npm

npm i faster-hi-mom

unpkg.com (UMD)


<script src="https://unpkg.com/hi-mom/lib/faster-hi-mom.umd.js"></script>

Usage

CommonJS

const { hiMom } = require("faster-hi-mom");

console.log(hiMom()); // Hi, mom!

ES Modules

import { hiMom } from "faster-hi-mom";

console.log(hiMom()); // Hi, mom!

Browser (UMD)

console.log(hiMom.hiMom());

custom mother name

import { hiMom } from "faster-hi-mom";

console.log(hiMom("Mother")); // Hi, Mother!

Languages supported

  • ar - Arabic
  • ar-IQ - Iraqi Arabic
  • as - Assamese
  • ca - Catalan
  • cn - Chinese
  • cs - Czech
  • de - German
  • en - English
  • en-AU - Australian English
  • es - Spanish
  • fr - French
  • he - Hebrew
  • hi - Hindi
  • hu - Hungarian
  • id - Indonesian
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • ms - Malay
  • nl-BE - Flemish
  • nl-NL - Dutch
  • pl - Polish
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • si - Sinhala
  • sr - Serbian
  • ta - Tamil
  • th - Thai
  • tr - Turkish
  • ua - Ukrainian
  • vi - Vietnamese
  • zh - Zhongwen

Performance and benchmarking

yarn run bench

Now you can say hi to your mom! like a 10x engineer 😎

faster-hi-mom is around 25-65x faster than hi-mom

| benchmark vs ops/sec | hi-mom | faster-hi-mom | improvement | |-----------------------|-----------|---------------|-------------| | no args | 3,289,873 | 211,331,050 | 6423% | | custom name | 3,512,832 | 121,363,740 | 3454% | | random names | 3,097,499 | 79,534,057 | 2567% | | random strings | 3,132,304 | 80,496,426 | 2569% |

Benchmark result

hi-mom no args x 3,289,873 ops/sec ±0.89% (88 runs sampled)
faster-hi-mom no args x 211,331,050 ops/sec ±0.48% (93 runs sampled)
hi-mom with custom-name x 3,512,832 ops/sec ±0.44% (91 runs sampled)
faster-hi-mom with custom-name x 121,363,740 ops/sec ±0.51% (90 runs sampled)
hi-mom with 10000 names x 3,097,499 ops/sec ±1.05% (92 runs sampled)
faster-hi-mom with 10000 names x 79,534,057 ops/sec ±0.31% (91 runs sampled)
hi-mom with 10000 random strings x 3,132,304 ops/sec ±1.09% (93 runs sampled)
faster-hi-mom with 10000 random strings x 80,496,426 ops/sec ±0.18% (90 runs sampled)