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

postcss-color-rebeccapurple

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-color-rebeccapurple - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

8

CHANGELOG.md

@@ -1,3 +0,9 @@

# 3.0.0 - 2016-05-10
# 3.1.0 - 2018-05-01
- Improve `rebeccapurple` pre-parse word detection
- Switched from `postcss-value-parser` to `postcss-values-parser`
- Bump `postcss` from `^6.0.1` to `^6.0.22`
# 3.0.0 - 2017-05-10
- Added: compatibility with postcss v6.x

@@ -4,0 +10,0 @@

13

index.js

@@ -5,4 +5,5 @@ /**

const postcss = require("postcss")
const valueParser = require("postcss-value-parser")
const valueParser = require("postcss-values-parser")
const color = "#639"
const regexp = /(^|[^\w-])rebeccapurple([^\w-]|$)/

@@ -16,10 +17,14 @@ /**

if (value && value.indexOf("rebeccapurple") !== -1) {
decl.value = valueParser(value).walk((node) => {
if (value && regexp.test(value)) {
const ast = valueParser(value).parse()
ast.walk(node => {
if (node.type === "word" && node.value === "rebeccapurple") {
node.value = color
}
}).toString()
})
decl.value = ast.toString()
}
})
})
{
"name": "postcss-color-rebeccapurple",
"version": "3.0.0",
"version": "3.1.0",
"description": "PostCSS plugin to transform W3C CSS rebeccapurple color to more compatible CSS (rgb())",

@@ -24,10 +24,10 @@ "keywords": [

"dependencies": {
"postcss": "^6.0.1",
"postcss-value-parser": "^3.3.0"
"postcss": "^6.0.22",
"postcss-values-parser": "^1.5.0"
},
"devDependencies": {
"jscs": "^3.0.7",
"jshint": "^2.9.4",
"jshint": "^2.9.5",
"npmpub": "^3.1.0",
"tape": "^4.6.3"
"tape": "^4.9.0"
},

@@ -34,0 +34,0 @@ "scripts": {

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