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.1 to 4.0.2

29

dist/index.js

@@ -35,5 +35,5 @@ 'use strict';

const value = node.value.toLowerCase();
const lowerCasedValue = node.value.toLowerCase();
if (value === 'steps') {
if (lowerCasedValue === 'steps') {
// Don't bother checking the step-end case as it has the same length

@@ -44,13 +44,19 @@ // as steps(1)

node.value = 'step-start';
delete node.nodes;
return;
}
// The end case is actually the browser default, so it isn't required.
if (node.nodes[2] && node.nodes[2].value.toLowerCase() === 'end') {
node.nodes = [node.nodes[0]];
return;
}
return false;
}
if (value === 'cubic-bezier') {
if (lowerCasedValue === 'cubic-bezier') {
const match = getMatch(node.nodes.filter(evenValues).map(getValue));

@@ -61,3 +67,5 @@

node.value = match;
delete node.nodes;
return;

@@ -70,4 +78,17 @@ }

return css => {
const cache = {};
css.walkDecls(/(animation|transition)(-timing-function|$)/i, decl => {
decl.value = (0, _postcssValueParser2.default)(decl.value).walk(reduce).toString();
const value = decl.value;
if (cache[value]) {
decl.value = cache[value];
return;
}
const result = (0, _postcssValueParser2.default)(value).walk(reduce).toString();
decl.value = result;
cache[value] = result;
});

@@ -74,0 +95,0 @@ };

2

package.json
{
"name": "postcss-normalize-timing-functions",
"version": "4.0.1",
"version": "4.0.2",
"description": "Normalize CSS animation/transition timing functions.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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