{"id":21251685,"url":"https://github.com/bolshchikov/bytes-counter","last_synced_at":"2025-07-11T01:32:23.160Z","repository":{"id":24361381,"uuid":"27760211","full_name":"bolshchikov/bytes-counter","owner":"bolshchikov","description":"Calculate the bytes in JS string","archived":false,"fork":false,"pushed_at":"2018-07-22T06:03:20.000Z","size":16,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-15T22:14:05.545Z","etag":null,"topics":["bytes","couter","library","string"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bolshchikov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-09T09:56:42.000Z","updated_at":"2018-07-22T06:03:21.000Z","dependencies_parsed_at":"2022-09-01T00:52:43.359Z","dependency_job_id":null,"html_url":"https://github.com/bolshchikov/bytes-counter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolshchikov%2Fbytes-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolshchikov%2Fbytes-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolshchikov%2Fbytes-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolshchikov%2Fbytes-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolshchikov","download_url":"https://codeload.github.com/bolshchikov/bytes-counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669628,"owners_count":17505363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytes","couter","library","string"],"created_at":"2024-11-21T03:43:05.986Z","updated_at":"2024-11-21T03:43:06.640Z","avatar_url":"https://github.com/bolshchikov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bytes-counter\n[![Build Status](https://secure.travis-ci.org/bolshchikov/bytes-counter.svg?branch=master)](https://travis-ci.org/bolshchikov/bytes-counter)\n[![NPM version](https://badge.fury.io/js/bytes-counter.svg)](http://badge.fury.io/js/bytes-counter)\n[![npm](https://img.shields.io/npm/dm/bytes-counter.svg)](https://www.npmjs.com/package/bytes-counter)\n\n\n\u003e Calculates the amount of bytes in JS string\n\n## Installation \n    $ npm install bytes-counter\n    $ bower install bytes-counter\n\n## Use\nThe usage of the lib is very straight forward. Call the `count` method of bytesCounter and pass the `string`.\nIn case other type is passed, the method will try to `JSON.stringify` the passed argument. \n\n```js\nvar bytes = bytesCounter.count(str);\n```\n\n## Testing\n### Install global dependencies\n\n    $ npm install -g grunt-cli bower\n\n#### Run unit tests\n\n    $ grunt test\n\n#### Run code coverage\n\n    $ grunt cover\n\n#### Run all tests with reports for ci systems\n\n    $ grunt ci\n\n## Contributing\nInstead of us handing out a formal style guide, simply stick to the existing programming style. Please create descriptive commit messages.\nWe use a git hook to validate the commit messages against these [rules](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w).\nEasily expand Baboon with your own extensions or changes in the functionality of Baboon itself. Use this workflow:\n\n1. Write your functionality\n2. Write unit tests for your functionality\n3. Create an example of your functionality in the sample application (optional)\n4. Document your functionality in the documentation section of example app\n5. Write unit tests for the example\n6. Add end to end tests for the example\n7. All tests should be successful\n8. Check your test coverage (90 - 100%)\n9. Make a pull request\n\nWe will check the tests, the example and test coverage. In case your changes are useful and well tested, we will merge your requests.\n\n### Release a new version\nWe use [grunt-bump](https://github.com/vojtajina/grunt-bump) and [grunt-conventional-changelog](https://github.com/btford/grunt-conventional-changelog) internally to manage our releases.\nTo handle the workflow, we created a grunt task `release`. This happens:\n\n* Bump version in package.json\n* Update the CHANGELOG.md file\n* Commit in git with message \"chore: release v[`the new version number`]\"\n* Create a git tag v[`the new version number`]\n\n#### Create a new release\nRelease a new patch\n\n    $ grunt release\n\nRelease a new minor version\n\n    $ grunt release:minor\n\nRelease a new major version\n\n    $ grunt release:major\n\n## Author\n[Sergey N. Bolshchikov](http://bolshchikov.net)\n\n## License\nCopyright (C) 2014 Sergey N. Bolshchikov \u003csergey@bolshchikov.net\u003e\nLicensed under the MIT license.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolshchikov%2Fbytes-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolshchikov%2Fbytes-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolshchikov%2Fbytes-counter/lists"}