{"_id":"sizeof","_rev":"25-092389dd48159f714dcd48dd343ae107","name":"sizeof","time":{"modified":"2022-06-26T20:26:55.190Z","created":"2013-02-18T12:27:02.028Z","0.1.1":"2013-02-18T12:27:05.532Z","0.1.2":"2013-02-18T12:28:34.992Z","0.1.3":"2013-02-18T20:53:21.782Z","0.1.4":"2013-02-18T21:22:37.136Z","0.1.5":"2013-02-18T21:45:26.043Z","0.1.0":"2013-02-18T22:07:27.373Z","1.0.0":"2014-08-31T10:08:26.389Z"},"maintainers":[{"name":"lyroyce","email":"lyroyce@sina.com"}],"dist-tags":{"latest":"1.0.0"},"description":"Calculates the size of Javascript object.","readme":"# sizeof\r\n\r\nCalculates the approximate size of Javascript object.\r\n\r\n# Example\r\n\r\n\tvar sizeof = require('sizeof'); \r\n\tvar anyObject = {\r\n\t\t'key': {\r\n\t\t\tname: 'abc', \r\n\t\t\tage: 123, \r\n\t\t\tactive: true\r\n\t\t}\r\n\t}\r\n\tconsole.log(sizeof.sizeof(anyObject));\t// 50\r\n\tconsole.log(sizeof.sizeof(anyObject, true));\t// 50B\r\n\r\n# APIs\r\n\r\n- **sizeof(object, pretty)**\r\n\t\r\n\t- Gets the approximate size of the given object in bytes.\r\n\t- `pretty`: if sets to `true`, returns the size in pretty format (e.g., 35.298K).","versions":{"1.0.0":{"name":"sizeof","version":"1.0.0","description":"Calculates the size of Javascript object.","keywords":["size","sizeof","js","object","array","memory"],"main":"index.js","scripts":{"test":"mocha -t test/"},"author":{"name":"Yin Li"},"repository":{"type":"git","url":"git@github.com:lyroyce/sizeof.git"},"license":"MIT","bugs":{"url":"https://github.com/lyroyce/sizeof/issues"},"homepage":"https://github.com/lyroyce/sizeof","_id":"sizeof@1.0.0","_shasum":"41ade1a9b65d29e93a43eccf4a63f0d5818f200e","_from":".","_npmVersion":"1.4.7","_npmUser":{"name":"lyroyce","email":"lyroyce@sina.com"},"maintainers":[{"name":"lyroyce","email":"lyroyce@sina.com"}],"dist":{"shasum":"41ade1a9b65d29e93a43eccf4a63f0d5818f200e","tarball":"https://registry.npmjs.org/sizeof/-/sizeof-1.0.0.tgz","integrity":"sha512-g4OQ0bVHnbik2WwL9nN59ojhADXFPjJq0hWn69a2eJdt3BsxcCU5oWgaXwm8ZUXlGYx9qTOiMFlOdlqoibnz/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAXuQq5LVXEqGmPjoqh9tsNb4HVnky20sip6Uv9I7KSwAiBvlkNsYQAOelax0Jpd+lzPgwwAX9WbPk79MkeOgxJS4w=="}]}}},"homepage":"https://github.com/lyroyce/sizeof","keywords":["size","sizeof","js","object","array","memory"],"repository":{"type":"git","url":"git@github.com:lyroyce/sizeof.git"},"author":{"name":"Yin Li"},"bugs":{"url":"https://github.com/lyroyce/sizeof/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mikemaccana":true}}