Skip to content

Commit 5b92ccc

Browse files
committed
Merge branch 'release/1.2.0'
2 parents 5a1694c + 4573d2c commit 5b92ccc

8 files changed

+24
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules/
22
dev/
33
coverage/
4+
!coverage/badge-*.svg
45
npm-debug.log
56
yarn-error.log
67
yarn.lock

README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# bit-array
22

3+
**License**:
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
**Branches, Functions, Lines, Statements**:
6+
![Coverage Branches](./coverage/badge-branches.svg)
7+
![Coverage Functions](./coverage/badge-functions.svg)
8+
![Coverage Lines](./coverage/badge-lines.svg)
9+
![Coverage Statements](./coverage/badge-statements.svg)
10+
311
Save memory space by using a BitArray! Behind the scene, the library stores bits within elements of a `Uint8Array` resulting in memory space savings.
412

513
```typescript
@@ -65,7 +73,7 @@ Method | Description
6573
--- | ---
6674
**`pushAll(values: Array<bit>)`** | Pushes a an array of bits onto the array
6775
**`push(value: bit)`** | Pushes a single bit onto the array
68-
**`atIndex(index: number)`** | Gets the bit at a given index.
76+
**`atIndex(index: number)`** | Gets the bit at a given index
6977
**`atIndexRange(index: number, count?: number)`** | Gets count bits at a given index. If count is null, the range goes to the end of the array
7078
**`set(index: number, value: bit)`** | Sets a specified bit at an index of the array
7179

@@ -87,3 +95,6 @@ Initial release
8795
Added method set and made count parameter optional for atIndexRange
8896
- `set(index: number, value: bit)`
8997
- `atIndexRange(index: number, count?: number)`
98+
99+
### 1.2.0
100+
Added code coverage badge creation on running tests

coverage/badge-branches.svg

+1
Loading

coverage/badge-functions.svg

+1
Loading

coverage/badge-lines.svg

+1
Loading

coverage/badge-statements.svg

+1
Loading

jest.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ module.exports = {
1414
"json",
1515
"node"
1616
],
17+
coverageReporters: [
18+
"json-summary",
19+
"text",
20+
"lcov"
21+
]
1722
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"clean-webpack-plugin": "^0.1.19",
2525
"copy-webpack-plugin": "^4.5.1",
2626
"jest": "^23.4.1",
27+
"jest-coverage-badges": "^1.0.0",
2728
"ts-jest": "^23.0.1",
2829
"ts-loader": "^4.1.0",
2930
"typescript": "^2.7.2",
@@ -36,6 +37,6 @@
3637
"scripts": {
3738
"start": "webpack-dev-server --open-page dev/index.html --config webpack.dev.js --mode development ",
3839
"build": "webpack --config webpack.prod.js --mode production",
39-
"test": "jest --coverage"
40+
"test": "jest --coverage && jest-coverage-badges"
4041
}
4142
}

0 commit comments

Comments
 (0)