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

colormin

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colormin - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

index.js

@@ -14,3 +14,3 @@ 'use strict';

function longer (a, b) {
function shorter (a, b) {
return (a && a.length < b.length ? a : b).toLowerCase();

@@ -40,3 +40,3 @@ }

})[0];
return longer(keyword, colour);
return shorter(keyword, colour);
} else if (ctype.isKeyword(colour)) {

@@ -46,3 +46,3 @@ var hex = colourNames[filterColours(function (key) {

})[0]];
return longer(hex, colour);
return shorter(hex, colour);
}

@@ -49,0 +49,0 @@ // Possibly malformed, just pass through

'use strict';
module.exports = function trimLeadingZero (str) {
return str.replace(/0(\.\d*)/g, '$1');
return str.replace(/([^\d])0(\.\d*)/g, '$1$2');
};
{
"name": "colormin",
"version": "1.0.1",
"version": "1.0.2",
"description": "Turn a CSS color into its smallest representation.",

@@ -19,3 +19,3 @@ "main": "index.js",

"name": "Ben Briggs",
"email": "therealbenbriggs@hotmail.com",
"email": "beneb.info@gmail.com",
"url": "http://beneb.info"

@@ -25,12 +25,9 @@ },

"dependencies": {
"color": "^0.8.0",
"color": "^0.9.0",
"css-color-names": "0.0.1"
},
"devDependencies": {
"tape": "^3.5.0"
"tape": "^4.0.0"
},
"repository": {
"type": "git",
"url": "git://github.com/ben-eb/colormin.git"
}
"repository": "ben-eb/colormin"
}

@@ -5,4 +5,6 @@ # colormin [![Build Status](https://travis-ci.org/ben-eb/colormin.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/colormin.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/colormin.svg)][deps]

Install via [npm](https://npmjs.org/package/colormin):
## Install
With [npm](https://npmjs.org/package/colormin) do:
```

@@ -32,3 +34,3 @@ npm install colormin --save

MIT © Ben Briggs
MIT © [Ben Briggs](http://beneb.info)

@@ -35,0 +37,0 @@ [ci]: https://travis-ci.org/ben-eb/colormin

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