https://github.com/mcollina/bitcount
Count your bits in a Number or in a Buffer
https://github.com/mcollina/bitcount
Last synced: 2 months ago
JSON representation
Count your bits in a Number or in a Buffer
- Host: GitHub
- URL: https://github.com/mcollina/bitcount
- Owner: mcollina
- Created: 2014-04-09T17:35:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-09T17:49:42.000Z (over 11 years ago)
- Last Synced: 2024-12-27T17:59:32.994Z (7 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
bitcount [](https://travis-ci.org/mcollina/bitcount)
=================================================================Counts your bits in a number or in a Buffer
* Installation
* Basic Example
* Licence & copyright```
$ npm install bitcount --save
``````js
var bitcount = require('bitcount')console.log(bitcount(5))
console.log(bitcount(new Buffer([1, 0, 1]))
```## LICENSE
Copyright (c) 2014, Matteo Collina
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.