Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-normalize-timing-functions

Package Overview
Dependencies
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-normalize-timing-functions - npm Package Compare versions

Comparing version 4.0.0-rc.2 to 4.0.0

26

dist/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc