postcss-normalize-timing-functions
Advanced tools
Comparing version 4.0.0-rc.2 to 4.0.0
@@ -23,6 +23,4 @@ 'use strict'; | ||
var getMatch = (0, _cssnanoUtilGetMatch2.default)(_map2.default); | ||
var getValue = function getValue(node) { | ||
return parseFloat(node.value); | ||
}; | ||
const getMatch = (0, _cssnanoUtilGetMatch2.default)(_map2.default); | ||
const getValue = node => parseFloat(node.value); | ||
@@ -37,6 +35,9 @@ function evenValues(list, index) { | ||
} | ||
if (node.value === 'steps') { | ||
const value = node.value.toLowerCase(); | ||
if (value === 'steps') { | ||
// Don't bother checking the step-end case as it has the same length | ||
// as steps(1) | ||
if (getValue(node.nodes[0]) === 1 && node.nodes[2] && node.nodes[2].value === 'start') { | ||
if (getValue(node.nodes[0]) === 1 && node.nodes[2] && node.nodes[2].value.toLowerCase() === 'start') { | ||
node.type = 'word'; | ||
@@ -48,3 +49,3 @@ node.value = 'step-start'; | ||
// The end case is actually the browser default, so it isn't required. | ||
if (node.nodes[2] && node.nodes[2].value === 'end') { | ||
if (node.nodes[2] && node.nodes[2].value.toLowerCase() === 'end') { | ||
node.nodes = [node.nodes[0]]; | ||
@@ -55,4 +56,4 @@ return; | ||
} | ||
if (node.value === 'cubic-bezier') { | ||
var match = getMatch(node.nodes.filter(evenValues).map(getValue)); | ||
if (value === 'cubic-bezier') { | ||
const match = getMatch(node.nodes.filter(evenValues).map(getValue)); | ||
@@ -68,5 +69,6 @@ if (match) { | ||
exports.default = (0, _postcss.plugin)('postcss-normalize-timing-functions', function () { | ||
return function (css) { | ||
css.walkDecls(/(animation|transition)(-timing-function|$)/, function (decl) { | ||
exports.default = (0, _postcss.plugin)('postcss-normalize-timing-functions', () => { | ||
return css => { | ||
css.walkDecls(/(animation|transition)(-timing-function|$)/i, decl => { | ||
decl.prop = decl.prop.toLowerCase(); | ||
decl.value = (0, _postcssValueParser2.default)(decl.value).walk(reduce).toString(); | ||
@@ -73,0 +75,0 @@ }); |
{ | ||
"name": "postcss-normalize-timing-functions", | ||
"version": "4.0.0-rc.2", | ||
"version": "4.0.0", | ||
"description": "Normalize CSS animation/transition timing functions.", | ||
@@ -15,3 +15,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"cssnano-util-get-match": "^4.0.0-rc.2", | ||
"cssnano-util-get-match": "^4.0.0", | ||
"postcss": "^6.0.0", | ||
@@ -22,3 +22,3 @@ "postcss-value-parser": "^3.0.0" | ||
"babel-cli": "^6.0.0", | ||
"cross-env": "^3.0.0" | ||
"cross-env": "^5.0.0" | ||
}, | ||
@@ -30,10 +30,10 @@ "author": { | ||
}, | ||
"repository": "ben-eb/cssnano", | ||
"repository": "cssnano/cssnano", | ||
"bugs": { | ||
"url": "https://github.com/ben-eb/cssnano/issues" | ||
"url": "https://github.com/cssnano/cssnano/issues" | ||
}, | ||
"homepage": "https://github.com/ben-eb/cssnano", | ||
"homepage": "https://github.com/cssnano/cssnano", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">=6.9.0" | ||
} | ||
} |
@@ -38,3 +38,3 @@ # [postcss][postcss]-normalize-timing-functions | ||
See [CONTRIBUTORS.md](https://github.com/ben-eb/cssnano/blob/master/CONTRIBUTORS.md). | ||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md). | ||
@@ -41,0 +41,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5271
0
1