{"name":"byte-length","version":"0.1.1","description":"Get the real byte length of a string.","author":{"name":"Dylan Piercey","email":"pierceydylan@gmail.com"},"main":"index.js","license":"MIT","keywords":["bytes","string","length","content-length"],"repository":{"type":"git","url":"git+https://github.com/DylanPiercey/byte-length.git"},"gitHead":"bbda0006b962d3888e95d06be5544e994db74153","bugs":{"url":"https://github.com/DylanPiercey/byte-length/issues"},"homepage":"https://github.com/DylanPiercey/byte-length#readme","_id":"byte-length@0.1.1","scripts":{},"_shasum":"e9b4774dbce7c59764bf5be87c302789a88738c3","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.2.0","_npmUser":{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},"dist":{"shasum":"e9b4774dbce7c59764bf5be87c302789a88738c3","tarball":"http://registry-npm.ywwl.com/byte-length/download/byte-length-0.1.1.tgz","integrity":"sha512-eBCmYK4D6sYzwdtBbYsrHdj1t3oV4+z83SoMKfd7q/H14wlgXUyezJvvKjRpjWcUALvjzTR2yl5sq2GRLyLtNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPZBYiJl0jSssnBXE9WI71AUMHTG3StsbHC+KOXO6ZjQIgZU2XyeRUvy+/Acn07E1Np8zB4rPDvJaA45FwkS02C3Y="}],"size":1124,"noattachment":false,"key":"/byte-length/-/byte-length-0.1.1.tgz"},"maintainers":[{"name":"dylanpiercey","email":"pierceydylan@gmail.com"}],"directories":{},"readme":"<h1 align=\"center\">\n  <!-- Logo -->\n  <br/>\n  Byte-Length\n\t<br/>\n\n  <!-- Stability -->\n  <a href=\"https://nodejs.org/api/documentation.html#documentation_stability_index\">\n    <img src=\"https://img.shields.io/badge/stability-stable-brightgreen.svg\" alt=\"API Stability\"/>\n  </a>\n  <!-- TypeScript -->\n  <a href=\"http://typescriptlang.org\">\n    <img src=\"https://img.shields.io/badge/%3C%2F%3E-typescript-blue.svg\" alt=\"TypeScript\"/>\n  </a>\n  <!-- Prettier -->\n  <a href=\"https://github.com/prettier/prettier\">\n    <img src=\"https://img.shields.io/badge/styled_with-prettier-ff69b4.svg\" alt=\"Styled with prettier\"/>\n  </a>\n  <!-- Travis build -->\n  <a href=\"https://travis-ci.org/DylanPiercey/byte-length\">\n  <img src=\"https://img.shields.io/travis/DylanPiercey/byte-length.svg\" alt=\"Build status\"/>\n  </a>\n  <!-- Coveralls coverage -->\n  <a href=\"https://coveralls.io/github/DylanPiercey/byte-length\">\n    <img src=\"https://img.shields.io/coveralls/DylanPiercey/byte-length.svg\" alt=\"Test Coverage\"/>\n  </a>\n  <!-- NPM version -->\n  <a href=\"https://npmjs.org/package/byte-length\">\n    <img src=\"https://img.shields.io/npm/v/byte-length.svg\" alt=\"NPM Version\"/>\n  </a>\n  <!-- Downloads -->\n  <a href=\"https://npmjs.org/package/byte-length\">\n    <img src=\"https://img.shields.io/npm/dm/byte-length.svg\" alt=\"Downloads\"/>\n  </a>\n  <!-- Size -->\n  <a href=\"https://npmjs.org/package/byte-length\">\n    <img src=\"https://img.shields.io/badge/size-422b-green.svg\" alt=\"Browser Bundle Size\"/>\n  </a>\n</h1>\n\nCalculate the real byte length of any string.\n\n# Why\nIn node many will use `Buffer.byteLength`, however including the entire buffer shim in the browser just for getting the byte length of a string is not very conservative.\n\n# Installation\n\n```console\nnpm install byte-length\n```\n\n# Example\n\n```javascript\nimport { byteLength } from \"byte-length\";\n\nbyteLength(\"hello\"); //-> 5\nbyteLength(\"😀\"); //-> 4\nbyteLength(\"ｆｕｌｌｗｉｄｔｈ　ｃｈａｒａｃｔｅｒｓ\"); //-> 60\n```\n\n### Contributions\n\n* Use `npm test` to run tests.\n\nPlease feel free to create a PR!\n","publish_time":1450411861701,"_cnpm_publish_time":1450411861701,"dist-tags":{"latest":"1.0.2"}}