@palett/dye-factory
Advanced tools
Comparing version 0.7.6 to 0.7.7
@@ -9,17 +9,2 @@ 'use strict'; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
const spaceToAnsi = space => space === enumColorSpace.RGB ? utilAnsi.rgbToAnsi : space === enumColorSpace.HEX ? utilAnsi.hexToAnsi : space === enumColorSpace.HSL ? utilAnsi.hslToAnsi : utilAnsi.rgbToAnsi; | ||
@@ -44,8 +29,5 @@ /** @type {Function} */ | ||
constructor(ansi, head, tail) { | ||
_defineProperty(this, "ansi", void 0); | ||
_defineProperty(this, "head", void 0); | ||
_defineProperty(this, "tail", void 0); | ||
this.ansi = void 0; | ||
this.head = void 0; | ||
this.tail = void 0; | ||
this.ansi = ansi; | ||
@@ -52,0 +34,0 @@ this.head = head; |
@@ -5,17 +5,2 @@ import { RGB, HEX, HSL } from '@palett/enum-color-space'; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
const spaceToAnsi = space => space === RGB ? rgbToAnsi : space === HEX ? hexToAnsi : space === HSL ? hslToAnsi : rgbToAnsi; | ||
@@ -40,8 +25,5 @@ /** @type {Function} */ | ||
constructor(ansi, head, tail) { | ||
_defineProperty(this, "ansi", void 0); | ||
_defineProperty(this, "head", void 0); | ||
_defineProperty(this, "tail", void 0); | ||
this.ansi = void 0; | ||
this.head = void 0; | ||
this.tail = void 0; | ||
this.ansi = ansi; | ||
@@ -48,0 +30,0 @@ this.head = head; |
{ | ||
"name": "@palett/dye-factory", | ||
"version": "0.7.6", | ||
"version": "0.7.7", | ||
"description": "A colorant to string", | ||
@@ -20,5 +20,5 @@ "main": "dist/index.cjs.js", | ||
"@ject/oneself": "^0.0.10", | ||
"@palett/dye": "^0.7.6", | ||
"@palett/enum-color-space": "^0.7.6", | ||
"@palett/util-ansi": "^0.7.6" | ||
"@palett/dye": "^0.7.7", | ||
"@palett/enum-color-space": "^0.7.7", | ||
"@palett/util-ansi": "^0.7.7" | ||
}, | ||
@@ -43,3 +43,3 @@ "repository": { | ||
"homepage": "https://github.com/hoyeungw/palett/dye#readme", | ||
"gitHead": "2f12c5c3bde3ebbf1feaae0a03819abe0cac143f" | ||
"gitHead": "c7c1417a65909783b3589e2635aa484eead05695" | ||
} |
6988
117
Updated@palett/dye@^0.7.7
Updated@palett/util-ansi@^0.7.7