JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q38340F
  • License MIT

Get the size of any type of value.

Package Exports

  • any-size

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (any-size) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Any Size Travis CI Build Status

Get the size of a value. Supports objects, array-like objects, strings (with ansi stripping and unicode character recognition), numbers, maps and sets.

NPM Badge

Install

npm install any-size

Usage

const size = require("any-size")

size("unicorns")
//=> 8
 
size([1, 2, 3, 4, 5])
//=> 5

size({a: 1, b: 2, c: 3})
//=> 3

API

anySize(input)

input

Type: any

The value to get the size of.