JSPM

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

Get the size of a 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 values, strings (with ansi stripping and unicode character recognition), numbers, bigints, maps, sets and array buffers.

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.