New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

postcss-replace-overflow-wrap

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-replace-overflow-wrap - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

4

CHANGELOG.md

@@ -0,2 +1,6 @@

## 2.0
* Use PostCSS 6.x
* Use Node 4.x syntax
## 1.0
* Initial release

22

index.js

@@ -1,19 +0,15 @@

var postcss = require('postcss');
const postcss = require('postcss');
module.exports = postcss.plugin('postcss-replace-overflow-wrap', function (opts) {
module.exports = postcss.plugin('postcss-replace-overflow-wrap', (opts) => {
opts = opts || {};
var method = opts.method || 'replace';
const method = opts.method || 'replace';
return function (css, result) { // eslint-disable-line no-unused-vars
css.walkRules(function (rule) {
rule.walkDecls(function (decl, i) { // eslint-disable-line no-unused-vars
if (decl.prop === 'overflow-wrap') {
decl.cloneBefore({ prop: 'word-wrap' });
if (method === 'replace') {
decl.remove();
}
}
});
return (css) => {
css.walkDecls('overflow-wrap', (decl) => {
decl.cloneBefore({ prop: 'word-wrap' });
if (method === 'replace') {
decl.remove();
}
});
};
});
{
"name": "postcss-replace-overflow-wrap",
"version": "1.0.0",
"version": "2.0.0",
"description": "PostCSS plugin to replace overflow-wrap with word-wrap or optionally retain both declarations.",

@@ -19,9 +19,12 @@ "keywords": [

"homepage": "https://github.com/MattDiMu/postcss-replace-overflow-wrap",
"files": [
"index.js"
],
"dependencies": {
"postcss": "^5.0.16"
"postcss": "^6.0.1"
},
"devDependencies": {
"ava": "^0.14.0",
"eslint": "^2.1.0",
"eslint-config-postcss": "^2.0.0"
"ava": "^0.19.1",
"eslint": "^3.19.0",
"eslint-config-postcss": "^2.0.2"
},

@@ -28,0 +31,0 @@ "scripts": {

@@ -35,3 +35,2 @@ # PostCSS Replace Overflow Wrap [![Build Status][ci-img]][ci]

## Usage

@@ -38,0 +37,0 @@

Sorry, the diff of this file is not supported yet

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