// npm package
filesize.js
filesize.js is a simple browserjs / nodejs library to make filesize human-readable.
versions
3
maintainers
1
license
MIT
first publish
2016-09-22
publisher
atool
tarball
7,407 B
AUTO-PUBLISHED·1 version indexed·latest published 2019-10-10
// publisher campaignby atool
9 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 8 other packages that our pipeline flagged — the shape of a coordinated campaign, not a one-off. Each link below opens that sibling's analysis.
// offending code· @2.0.0· no static-pattern hits
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @2.0.0··AUTO-PUBLISHED·publisher: atoolheuristic 75/100static flags 0llm benign (0.85) via ollamapublisher-multi-name-burst:5osv-flagged:MAL-2026-4133
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- install scripts --- ### prepublishOnly npm run build --- package.json (entry) --- { "name": "filesize.js", "officialName": "filesize.js", "version": "2.0.0", "summary": "filesize.js is a simple browserjs / nodejs library to make filesize human-readable.", "description": "filesize.js is a simple browserjs / nodejs library to make filesize human-readable.", "main": "lib/index.js", "files": [ "lib" ], "scripts": { "clean": "rimraf -rf lib", "lint": "eslint src/**/*", "lint-staged": "lint-staged", "test": "jest", "start": "tsc -w", "ci": "npm run lint && npm run test", "build": "npm run clean && tsc", "prepublishOnly": "npm run build", "coveralls": "cat ./coverage/lcov.info | coveralls" }, "dependencies": {}, "devDependencies": { "@commitlint/cli": "^8.2.0", "@types/jest": "^24.0.18", "@typescript-eslint/eslint-plugin": "^2.3.1", "@typescript-eslint/parser": "^2.3.1", "coveralls": "^3.0.6", "eslint": "^6.4.0", "eslint-config-prettier": "^6.3.0", "husky": "^3.0.5", "jest": "^24.9.0", "jest-electron": "^0.1.7", "lint-staged": "^9.3.0", "prettier": "^1.18.2", "rimraf": "^3.0.0", "ts-jest": "^24.1.0", "typescript": "^3.6.3" }, "jest": { "ru --- index.js (entry) --- "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var spec_1 = require("./spec"); /** * file size * @param bytes * @param fixed * @param spec */ function default_1(bytes, fixed, spec) { if (fixed === void 0) { fixed = 1; } bytes = Math.abs(bytes); var _a = spec_1.SPECS[spec] || spec_1.SPECS['jedec'], radix = _a.radix, unit = _a.unit; var loop = 0; // calculate while (bytes >= radix) { bytes /= radix; ++loop; } return bytes.toFixed(fixed) + " " + unit[loop]; } exports.default = default_1; //# sourceMappingURL=index.js.map
