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

string-to-color

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-to-color - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

.github/workflows/node.js.yml

4

index.js

@@ -22,3 +22,3 @@ var toHex = require('colornames');

var color = toHex(word);
if (color) colors.push(hexRgb(trimStart(color, '#')));
if (color) colors.push(hexRgb(trimStart(color, '#'), {format: 'array'}));
});

@@ -51,3 +51,3 @@ return colors;

hex = padEnd(hex, 6, hex);
var rgb = hexRgb(hex);
var rgb = hexRgb(hex, {format: 'array'});
if (mixed)

@@ -54,0 +54,0 @@ return rgbHex(

{
"name": "string-to-color",
"version": "2.2.1",
"version": "2.2.2",
"description": "Generates color from any string or any object",
"main": "index.js",
"types": "index.d.ts",
"scripts": {

@@ -8,0 +7,0 @@ "test": "./node_modules/.bin/mocha test"

@@ -20,3 +20,3 @@ var should = require('chai').should();

var hex = generate("i am a red fox");
var rgb = hexRgb(hex);
var rgb = hexRgb(hex, {format: 'array'});
rgb[0].should.be.above(rgb[1]);

@@ -23,0 +23,0 @@ rgb[0].should.be.above(rgb[2]);

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