Skip to content

bendrucker/json-size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-size Build Status

Find the size (bytes) of a serialized object

Install

$ npm install --save json-size

Usage

var jsonSize = require('json-size')

jsonSize({foo: 'bar'})
//=> 13

API

jsonSize(value) -> number

Returns the number of bytes of the resulting JSON.

value

Required
Type: any

A value to stringify.

License

MIT © Ben Drucker

About

Find the size (bytes) of a serialized object

Resources

License

Stars

Watchers

Forks

Packages

No packages published