@dvlden/numen
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

numen

GitHub package.json version npm bundle size (scoped)

Numen

A utility module that returns correct length of a numerical value. Working with numbers is painful, especially in JavaScript world. Casting a number to a string, then using just .length to check the count is not sufficient enough.

Check test cases if you are interested in every possibility that it handles.


Installation

Use your favourite package manager... In my case that's pnpm.

pnpm i @dvlden/numen

Usage

Browser

import { numen } from '@dvlden/numen'

if (numen(123) === 3) {
  // do something
}

Node

const { numen } = require('@dvlden/numen')

if (numen(123) === 3) {
  // do something
}

Dependents (0)

Package Sidebar

Install

npm i @dvlden/numen

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.03 kB

Total Files

7

Last publish

Collaborators

  • dvlden