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

color-octree

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-octree - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

dist/cjs.js
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _slicedToArray(arr, i) {

@@ -77,2 +75,3 @@ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();

};
class ColorOctant {

@@ -156,3 +155,2 @@ constructor(path = []) {

exports.hexToOctants = hexToOctants;
exports.default = ColorOctant;
module.exports = ColorOctant;

@@ -73,2 +73,3 @@ function _slicedToArray(arr, i) {

};
class ColorOctant {

@@ -153,2 +154,1 @@ constructor(path = []) {

export default ColorOctant;
export { hexToOctants };
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.colorutil = {})));
}(this, (function (exports) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.colorutil = factory());
}(this, (function () { 'use strict';

@@ -79,2 +79,3 @@ function _slicedToArray(arr, i) {

};
class ColorOctant {

@@ -158,7 +159,4 @@ constructor(path = []) {

exports.hexToOctants = hexToOctants;
exports.default = ColorOctant;
return ColorOctant;
Object.defineProperty(exports, '__esModule', { value: true });
})));

@@ -10,3 +10,3 @@ const parseHex = hex => hex.length < 6 ? hex[hex.length-3].repeat(2)+hex[hex.length-2].repeat(2)+hex[hex.length-1].repeat(2) : hex.slice(-6);

export const hexToOctants = hex => {
const hexToOctants = hex => {
const h = parseHex(hex);

@@ -13,0 +13,0 @@ const [r,g,b] = Array.from({length:3}, (_,i)=>parseInt(h.slice(2*i, 2*i+2), 16).toString(2).padStart(8,0))

{
"name": "color-octree",
"version": "1.1.0",
"version": "1.1.1",
"description": "Get closest hex color",

@@ -5,0 +5,0 @@ "main": "dist/cjs.js",

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