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

@symbo.ls/scratch

Package Overview
Dependencies
Maintainers
4
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbo.ls/scratch - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

2

package.json

@@ -5,3 +5,3 @@ {

"author": "Symbols",
"version": "0.3.2",
"version": "0.3.3",
"files": [

@@ -8,0 +8,0 @@ "src"

@@ -18,2 +18,4 @@ 'use strict'

const ENV = process.env.NODE_ENV
const setColor = (val, key) => {

@@ -43,3 +45,6 @@ const [r, g, b, a = 1] = colorStringToRgbaArray(val.value || val)

export const getColor = value => {
if (!isString(value)) return console.warn(value, '- type for color is not valid')
if (!isString(value)) {
if (ENV === 'test' || ENV === 'development') console.warn(value, '- type for color is not valid')
return
}

@@ -51,3 +56,3 @@ const [name, alpha, tone] = isArray(value) ? value : value.split(' ')

if (!val) {
console.warn('Can\'t find color', name)
if (ENV === 'test' || ENV === 'development') console.warn('Can\'t find color', name)
return value

@@ -103,3 +108,4 @@ }

else if (isString(value) && THEME[value]) return getThemeValue(THEME[value])
console.warn('Can\'t find theme', value)
if (ENV === 'test' || ENV === 'development') console.warn('Can\'t find theme', value)
}

@@ -106,0 +112,0 @@

@@ -5,2 +5,4 @@ 'use strict'

const ENV = process.env.NODE_ENV
export const isString = arg => typeof arg === 'string'

@@ -157,3 +159,6 @@

const arr = colorStringToRgbaArray(color)
if (!arr) return console.warn(color + 'color is not rgba')
if (!arr) {
if (ENV === 'test' || ENV === 'development') console.warn(color + 'color is not rgba')
return
}
arr[3] = opacity

@@ -160,0 +165,0 @@ return `rgba(${arr})`

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