Socket
Socket
Sign inDemoInstall

@romainberger/css-diff

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

@romainberger/css-diff - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

lib/index.js

@@ -6,2 +6,6 @@ 'use strict';

module.exports = function (source, reversed) {
try {
source = JSON.parse(source);
reversed = JSON.parse(reversed);
} catch (e) {}
var sourceAst = (0, _postcss.parse)(source);

@@ -8,0 +12,0 @@ var reversedAst = (0, _postcss.parse)(reversed);

2

package.json
{
"name": "@romainberger/css-diff",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get the diff between two css",

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

@@ -1,21 +0,9 @@

# NPM Module Boilerplate [![Build Status](https://img.shields.io/travis/romainberger/npm-module-boilerplate/master.svg?style=flat-square)](https://travis-ci.org/romainberger/npm-module-boilerplate)
# CSS Diff [![Build Status](https://img.shields.io/travis/romainberger/css-diff/master.svg?style=flat-square)](https://travis-ci.org/romainberger/css-diff)
Personal boilerplate for modules.
Get the diff between two css.
Includes:
## Installation
* [Babel](https://babeljs.io/) stage 0
* [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) for testing
* [Flow](http://flowtype.org/) for static type checking
* [Travis CI](https://travis-ci.com/) for continuous integration
## New project initialization
```shell
$ git clone
$ mv npm-module-boilerplate awesome-module
$ cd awesome-module
$ rm -rf .git
$ git init
$ npm install
$ npm install @romainberger/css-diff
```

@@ -25,12 +13,23 @@

Run tests:
```js
const cssDiff = require('@romainberger/css-diff')
```shell
$ npm test
```
const cssA = `
body {
background: white;
color: red;
}
`
Run flow
const cssB = `
body {
background: white;
color: blue;
}
`
```shell
$ npm run flow
const diff = cssDiff(cssA, cssB)
// body {
// color: blue;
// }
```
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