color-octree
Advanced tools
Comparing version 1.1.0 to 1.1.1
'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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14803
441