https://github.com/blakeembrey/node-bit-string-mask
Mask a string using bits from an input number
https://github.com/blakeembrey/node-bit-string-mask
binary bits string-manipulation
Last synced: 4 months ago
JSON representation
Mask a string using bits from an input number
- Host: GitHub
- URL: https://github.com/blakeembrey/node-bit-string-mask
- Owner: blakeembrey
- License: other
- Created: 2017-04-21T03:12:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T06:12:12.000Z (about 2 years ago)
- Last Synced: 2025-06-08T23:27:27.586Z (9 months ago)
- Topics: binary, bits, string-manipulation
- Language: TypeScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Bit String Mask
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
> Mask a string using bits from an input number.
## Installation
```
npm install bit-string-mask --save
```
## Usage
```ts
import { mask } from 'bit-string-mask'
mask('test', 0) //=> "test"
mask('test', 1) //=> "Test"
mask('test', 2) //=> "tEst"
```
## TypeScript
This project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.
## License
MIT
[npm-image]: https://img.shields.io/npm/v/bit-string-mask.svg?style=flat
[npm-url]: https://npmjs.org/package/bit-string-mask
[downloads-image]: https://img.shields.io/npm/dm/bit-string-mask.svg?style=flat
[downloads-url]: https://npmjs.org/package/bit-string-mask
[travis-image]: https://img.shields.io/travis/blakeembrey/node-bit-string-mask.svg?style=flat
[travis-url]: https://travis-ci.org/blakeembrey/node-bit-string-mask
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/node-bit-string-mask.svg?style=flat
[coveralls-url]: https://coveralls.io/r/blakeembrey/node-bit-string-mask?branch=master