1.0.0 • Published 2 years ago

faster-hi-mom v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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/sechi-momfaster-hi-momimprovement
no args3,289,873211,331,0506423%
custom name3,512,832121,363,7403454%
random names3,097,49979,534,0572567%
random strings3,132,30480,496,4262569%

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)