pretty-num
Version:
Lightweight module for formatting numbers to a human readable string
105 lines (103 loc) • 2.68 kB
JSON
{
"name": "pretty-num",
"version": "0.6.2",
"description": "Lightweight module for formatting numbers to a human readable string",
"type": "module",
"browser": "dist/index.js",
"main": "src/index.js",
"module": "src/index.js",
"types": "types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"module": "./src/index.js",
"import": "./src/index.js",
"browser": "./dist/index.js"
},
"./*": {
"types": "./types/*.d.ts",
"module": "./src/*.js",
"import": "./src/*.js"
},
"./src/*.js": {
"types": "./types/*.d.ts",
"module": "./src/*.js",
"import": "./src/*.js"
}
},
"files": [
"/src/",
"/dist/",
"/types/"
],
"scripts": {
"build": "npm run bundle && npm run bundle:min",
"bundle": "rollup -c build/rollup.config.js",
"bundle:min": "rollup -c build/rollup.uglify.config.js",
"prepublishOnly": "npm run lint && npm run test && npm run tsc && npm run build",
"lint": "eslint --ext .js ./src ./test",
"lint:fix": "eslint --ext .js ./src ./test --fix",
"lint:publint": "npx --yes publint",
"lint:are-the-types-wrong": "npx --yes @arethetypeswrong/cli --pack .",
"tsc": "tsc -p .",
"test": "jest",
"coverage": "jest --coverage",
"precommit": "echo 'Pre-commit checks...' && npm run lint"
},
"pre-commit": [
"precommit"
],
"repository": {
"type": "git",
"url": "git+https://github.com/shrpne/pretty-num.git"
},
"keywords": [
"format",
"pretty",
"big",
"number",
"human",
"readable",
"string",
"text",
"exponential",
"thousands",
"separator",
"significant",
"round",
"decimal",
"fixed",
"decrease",
"precision"
],
"author": "shrpne <shrpne@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/shrpne/pretty-num/issues"
},
"dependencies": {
"from-exponential": "^1.1.1",
"thousands": "^1.0.1"
},
"devDependencies": {
"@babel/core": "^7.26.7",
"@babel/preset-env": "^7.26.7",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-node-resolve": "^13.3.0",
"babel-jest": "^28.1.3",
"coveralls": "^3.1.1",
"eslint": "^8.57.1",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^26.9.0",
"eslint-plugin-jsdoc": "^50.6.3",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-unicorn": "^56.0.1",
"jest": "^28.1.3",
"pre-commit": "^1.2.2",
"rollup": "^2.79.2",
"rollup-plugin-terser": "^7.0.2",
"typescript": "^5.7.3"
}
}