UNPKG

filesize

Version:

JavaScript library to generate a human readable String describing the file size

74 lines (73 loc) 2.73 kB
{ "name": "filesize", "description": "JavaScript library to generate a human readable String describing the file size", "version": "11.0.15", "homepage": "https://filesizejs.com", "author": "Jason Mulligan <jason.mulligan@avoidwork.com>", "repository": { "type": "git", "url": "git://github.com/avoidwork/filesize.js.git" }, "bugs": { "url": "https://github.com/avoidwork/filesize.js/issues" }, "files": [ "dist/filesize.js", "dist/filesize.cjs", "types/filesize.d.ts" ], "license": "BSD-3-Clause", "source": "src/filesize.js", "module": "dist/filesize.js", "main": "dist/filesize.cjs", "exports": { "types": "./types/filesize.d.ts", "import": "./dist/filesize.js", "require": "./dist/filesize.cjs" }, "type": "module", "sourceType": "module", "types": "types/filesize.d.ts", "engines": { "node": ">= 10.8.0" }, "scripts": { "build": "npm run rollup", "build:watch": "rollup --config --watch", "build:analyze": "npm run rollup && npm run analyze:size", "analyze:size": "echo 'Bundle size analysis:' && du -h dist/* && echo 'Gzipped sizes:' && gzip -c dist/filesize.min.js | wc -c | awk '{print $1\" bytes (gzipped)\"}' && gzip -c dist/filesize.umd.min.js | wc -c | awk '{print $1\" bytes (umd gzipped)\"}'", "changelog": "auto-changelog -p", "coverage": "node --test --experimental-test-coverage --test-coverage-exclude=dist/** --test-coverage-exclude=tests/** --test-reporter=spec tests/**/*.test.js 2>&1 | grep -A 1000 \"start of coverage report\" > coverage.txt", "lint": "npx oxlint *.js benchmarks src tests && npx oxfmt *.js benchmarks src tests/unit --check", "fix": "npx oxlint --fix *.js benchmarks src tests && npx oxfmt *.js benchmarks src tests/unit --write", "test": "npm run lint && node --test --experimental-test-coverage tests/**/*.js", "test:watch": "node --test --watch tests/**/*.js", "rollup": "rollup --config", "prepack": "npm run build", "prepare": "husky", "dev": "npm run build:watch", "benchmark": "node benchmarks/index.js", "benchmark:basic": "node benchmarks/basic-performance.js", "benchmark:options": "node benchmarks/options-benchmark.js", "benchmark:stress": "node benchmarks/stress-test.js", "benchmark:partial": "node benchmarks/partial-benchmark.js", "benchmark:gc": "node --expose-gc benchmarks/index.js" }, "devDependencies": { "@rollup/plugin-terser": "^1.0.0", "auto-changelog": "^2.5.0", "husky": "^9.1.7", "oxfmt": "^0.42.0", "oxlint": "^1.57.0", "rollup": "^4.52.0" }, "keywords": [ "file", "filesize", "size", "readable", "file system", "bytes", "diff" ] }