Skip to content

Commit 6f8279f

Browse files
committed
fix: prefixToMask(0) edge case, remove unused Bootstrap, update badge to 36 tests
1 parent 78f137b commit 6f8279f

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44
[![Status](https://img.shields.io/badge/Status-Stable-green)](https://github.com/Medalcode/NetOpsToolkit)
55
[![Deploy](https://img.shields.io/badge/Deploy-Netlify-00C7B7)](https://netops-toolkit.netlify.app)
6-
[![Tests](https://img.shields.io/badge/Tests-34%20passing-success)](https://github.com/Medalcode/NetOpsToolkit)
6+
[![Tests](https://img.shields.io/badge/Tests-36%20passing-success)](https://github.com/Medalcode/NetOpsToolkit)
77
[![CI](https://github.com/Medalcode/NetOpsToolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/Medalcode/NetOpsToolkit/actions)
88

99
> **"La Navaja Suiza para Ingenieros de Red"**

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@
2929
"tailwindcss": "^3.4.1",
3030
"vite": "^5.0.0"
3131
},
32-
"dependencies": {
33-
"@popperjs/core": "^2.11.8",
34-
"bootstrap": "^5.3.3"
35-
}
36-
,
32+
3733
"lint-staged": {
3834
"src/**/*.js": [
3935
"npm run lint:fix",

src/core/convert.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export function decimalToIP(decimal) {
3737
* prefixToMask(16) // "255.255.0.0"
3838
*/
3939
export function prefixToMask(prefix) {
40+
if (prefix === 0) return '0.0.0.0';
4041
const mask = (0xffffffff << (32 - prefix)) >>> 0;
4142
return decimalToIP(mask);
4243
}

0 commit comments

Comments
 (0)