{"name":"byte-length","version":"0.1.0","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"},"bugs":{"url":"https://github.com/DylanPiercey/byte-length/issues"},"homepage":"https://github.com/DylanPiercey/byte-length#readme","_id":"byte-length@0.1.0","scripts":{},"_shasum":"70dfa14da772f5652ccc5a8e86af6bd4eb3e9b83","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},"dist":{"shasum":"70dfa14da772f5652ccc5a8e86af6bd4eb3e9b83","tarball":"http://registry-npm.ywwl.com/byte-length/download/byte-length-0.1.0.tgz","integrity":"sha512-xZF4DevSoAh97rcg9ddWqvsrjiRZwBNSTbyRKg1020pcsbhR8ZS/3RWc2GAo59EVwgHG79eZ4Tg+BJ0aM93s7w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGelC/kre6Bw2Q8s/2STHtsFwGdtOjB/hVb5+VHlhaKQIgZWlA8z4fGVe0exlaynPA1Hdrs7ctHHbLcb4bM0QGz3Y="}],"size":1101,"noattachment":false,"key":"/byte-length/-/byte-length-0.1.0.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":1443846933932,"_cnpm_publish_time":1443846933932,"dist-tags":{"latest":"1.0.2"}}