package.json
4.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"_args": [
[
{
"raw": "reduce-css-calc@^1.2.6",
"scope": null,
"escapedName": "reduce-css-calc",
"name": "reduce-css-calc",
"rawSpec": "^1.2.6",
"spec": ">=1.2.6 <2.0.0",
"type": "range"
},
"D:\\100-Projects\\100-AIAHTML5\\400-SOURCECODE\\AIAHTML5.Admin\\node_modules\\postcss-calc"
]
],
"_from": "reduce-css-calc@>=1.2.6 <2.0.0",
"_id": "reduce-css-calc@1.3.0",
"_inCache": true,
"_location": "/reduce-css-calc",
"_nodeVersion": "5.12.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/reduce-css-calc-1.3.0.tgz_1472209420610_0.07836053264327347"
},
"_npmUser": {
"name": "moox",
"email": "m@moox.io"
},
"_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"raw": "reduce-css-calc@^1.2.6",
"scope": null,
"escapedName": "reduce-css-calc",
"name": "reduce-css-calc",
"rawSpec": "^1.2.6",
"spec": ">=1.2.6 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/postcss-calc"
],
"_resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz",
"_shasum": "747c914e049614a4c9cfbba629871ad1d2927716",
"_shrinkwrap": null,
"_spec": "reduce-css-calc@^1.2.6",
"_where": "D:\\100-Projects\\100-AIAHTML5\\400-SOURCECODE\\AIAHTML5.Admin\\node_modules\\postcss-calc",
"author": {
"name": "Maxime Thirouin"
},
"bugs": {
"url": "https://github.com/MoOx/reduce-css-calc/issues"
},
"dependencies": {
"balanced-match": "^0.4.2",
"math-expression-evaluator": "^1.2.14",
"reduce-function-call": "^1.0.1"
},
"description": "Reduce CSS calc() function to the maximum",
"devDependencies": {
"jscs": "^1.5.9",
"jshint": "^2.5.2",
"npmpub": "^3.0.3",
"tape": "^2.13.4"
},
"directories": {},
"dist": {
"shasum": "747c914e049614a4c9cfbba629871ad1d2927716",
"tarball": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz"
},
"files": [
"index.js"
],
"gitHead": "077b6d74d3807744c2854f7ba3a60626dcfdb504",
"homepage": "https://github.com/MoOx/reduce-css-calc#readme",
"keywords": [
"css",
"calculation",
"calc"
],
"license": "MIT",
"maintainers": [
{
"name": "moox",
"email": "m@moox.io"
}
],
"name": "reduce-css-calc",
"optionalDependencies": {},
"readme": "# reduce-css-calc [](https://travis-ci.org/MoOx/reduce-css-calc)\n\n> Reduce CSS calc() function to the maximum.\n\nParticularly useful for packages like [rework-calc](https://github.com/reworkcss/rework-calc) or [postcss-calc](https://github.com/postcss/postcss-calc).\n\n## Installation\n\n```console\n$ npm install reduce-css-calc\n```\n\n## Usage\n\n### `var reducedString = reduceCSSCalc(string, precision)`\n\n```javascript\nvar reduceCSSCalc = require('reduce-css-calc')\n\nreduceCSSCalc(\"calc(1 + 1)\")\n// 2\n\nreduceCSSCalc(\"calc((6 / 2) - (4 * 2) + 1)\")\n// -4\n\nreduceCSSCalc(\"calc(1/3)\")\n// 0.33333\n\nreduceCSSCalc(\"calc(1/3)\", 10)\n// 0.3333333333\n\nreduceCSSCalc(\"calc(3rem * 2 - 1rem)\")\n// 5rem\n\nreduceCSSCalc(\"calc(2 * 50%)\")\n// 100%\n\nreduceCSSCalc(\"calc(120% * 50%)\")\n// 60%\n\nreduceCSSCalc(\"a calc(1 + 1) b calc(1 - 1) c\")\n// a 2 b 0 c\n\nreduceCSSCalc(\"calc(calc(calc(1rem * 0.75) * 1.5) - 1rem)\")\n// 0.125rem\n\nreduceCSSCalc(\"calc(calc(calc(1rem * 0.75) * 1.5) - 1px)\")\n// calc(1.125rem - 1px)\n\nreduceCSSCalc(\"-moz-calc(100px / 2)\")\n// 50px\n\nreduceCSSCalc(\"-moz-calc(50% - 2em)\")\n// -moz-calc(50% - 2em)\n```\n\nSee [unit tests](test/index.js) for others examples.\n\n## Contributing\n\nWork on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.\n\n```console\n$ git clone https://github.com/MoOx/reduce-css-calc.git\n$ git checkout -b patch-1\n$ npm install\n$ npm test\n```\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE-MIT)\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/MoOx/reduce-css-calc.git"
},
"scripts": {
"jscs": "jscs *.js **/*.js",
"jshint": "jshint . --exclude node_modules",
"release": "npmpub",
"test": "npm run jscs && npm run jshint && tape test"
},
"version": "1.3.0"
}