Skip to content

Commit 8a2ec13

Browse files
committed
Add security policy
1 parent 377c08d commit 8a2ec13

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

README.md

+25-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# reduce-css-calc
22

33
[![Build Status](https://github.com/MoOx/reduce-css-calc/workflows/Build/badge.svg)](https://github.com/MoOx/reduce-css-calc/actions)
4+
45
> Reduce CSS calc() function to the maximum.
56
6-
Particularly useful for packages like [rework-calc](https://github.com/reworkcss/rework-calc) or [postcss-calc](https://github.com/postcss/postcss-calc).
7+
Particularly useful for packages like
8+
[rework-calc](https://github.com/reworkcss/rework-calc) or
9+
[postcss-calc](https://github.com/postcss/postcss-calc).
710

811
## Installation
912

@@ -16,42 +19,42 @@ npm install reduce-css-calc
1619
### `var reducedString = reduceCSSCalc(string, precision)`
1720

1821
```javascript
19-
var reduceCSSCalc = require('reduce-css-calc')
22+
var reduceCSSCalc = require("reduce-css-calc");
2023

21-
reduceCSSCalc("calc(1 + 1)")
24+
reduceCSSCalc("calc(1 + 1)");
2225
// 2
2326

24-
reduceCSSCalc("calc((6 / 2) - (4 * 2) + 1)")
27+
reduceCSSCalc("calc((6 / 2) - (4 * 2) + 1)");
2528
// -4
2629

27-
reduceCSSCalc("calc(1/3)")
30+
reduceCSSCalc("calc(1/3)");
2831
// 0.33333
2932

30-
reduceCSSCalc("calc(1/3)", 10)
33+
reduceCSSCalc("calc(1/3)", 10);
3134
// 0.3333333333
3235

33-
reduceCSSCalc("calc(3rem * 2 - 1rem)")
36+
reduceCSSCalc("calc(3rem * 2 - 1rem)");
3437
// 5rem
3538

36-
reduceCSSCalc("calc(2 * 50%)")
39+
reduceCSSCalc("calc(2 * 50%)");
3740
// 100%
3841

39-
reduceCSSCalc("calc(120% * 50%)")
42+
reduceCSSCalc("calc(120% * 50%)");
4043
// 60%
4144

42-
reduceCSSCalc("a calc(1 + 1) b calc(1 - 1) c")
45+
reduceCSSCalc("a calc(1 + 1) b calc(1 - 1) c");
4346
// a 2 b 0 c
4447

45-
reduceCSSCalc("calc(calc(calc(1rem * 0.75) * 1.5) - 1rem)")
48+
reduceCSSCalc("calc(calc(calc(1rem * 0.75) * 1.5) - 1rem)");
4649
// 0.125rem
4750

48-
reduceCSSCalc("calc(calc(calc(1rem * 0.75) * 1.5) - 1px)")
51+
reduceCSSCalc("calc(calc(calc(1rem * 0.75) * 1.5) - 1px)");
4952
// calc(1.125rem - 1px)
5053

51-
reduceCSSCalc("-moz-calc(100px / 2)")
54+
reduceCSSCalc("-moz-calc(100px / 2)");
5255
// 50px
5356

54-
reduceCSSCalc("-moz-calc(50% - 2em)")
57+
reduceCSSCalc("-moz-calc(50% - 2em)");
5558
// -moz-calc(50% - 2em)
5659
```
5760

@@ -61,7 +64,8 @@ See [unit tests](src/__tests__/index.js) for others examples.
6164

6265
## Contributing
6366

64-
Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
67+
Work on a branch, install dev-dependencies, respect coding style & run tests
68+
before submitting a bug fix or a feature.
6569

6670
```console
6771
git clone https://github.com/MoOx/reduce-css-calc.git
@@ -73,3 +77,9 @@ npm test
7377
## [Changelog](CHANGELOG.md)
7478

7579
## [License](LICENSE-MIT)
80+
81+
## Security contact information
82+
83+
To report a security vulnerability, please use the
84+
[Tidelift security contact](https://tidelift.com/security). Tidelift will
85+
coordinate the fix and disclosure.

0 commit comments

Comments
 (0)