@palett/dye-factory
Advanced tools
Comparing version 0.8.18 to 0.9.0
@@ -51,3 +51,3 @@ 'use strict'; | ||
function enstyle(style) { | ||
if (!(style != null && style.length)) return this; | ||
if (!(style !== null && style !== void 0 && style.length)) return this; | ||
excite.call(this); | ||
@@ -69,5 +69,6 @@ | ||
class DyeFab { | ||
head = ''; | ||
tail = ''; | ||
constructor(space, style) { | ||
this.head = ''; | ||
this.tail = ''; | ||
if (space) this.setEncolor(space); | ||
@@ -176,3 +177,3 @@ if (style) this.enstyle(style); | ||
const local = (this == null ? void 0 : (_this$slice = this.slice) == null ? void 0 : _this$slice.call(this)) ?? DyeFab.shallow(); | ||
const local = (this === null || this === void 0 ? void 0 : (_this$slice = this.slice) === null || _this$slice === void 0 ? void 0 : _this$slice.call(this)) ?? DyeFab.shallow(); | ||
if (color) this.encolor.call(local, color); | ||
@@ -185,3 +186,3 @@ return DyeFab.prototype.render.bind(local); | ||
const local = (this == null ? void 0 : (_this$slice2 = this.slice) == null ? void 0 : _this$slice2.call(this)) ?? DyeFab.shallow(); | ||
const local = (this === null || this === void 0 ? void 0 : (_this$slice2 = this.slice) === null || _this$slice2 === void 0 ? void 0 : _this$slice2.call(this)) ?? DyeFab.shallow(); | ||
if (color) this.encolor.call(local, color); | ||
@@ -188,0 +189,0 @@ return DyeFab.prototype.render.call(local, text); |
@@ -47,3 +47,3 @@ import { RGB, HEX, HSL, INT } from '@palett/enum-color-space'; | ||
function enstyle(style) { | ||
if (!(style != null && style.length)) return this; | ||
if (!(style !== null && style !== void 0 && style.length)) return this; | ||
excite.call(this); | ||
@@ -65,5 +65,6 @@ | ||
class DyeFab { | ||
head = ''; | ||
tail = ''; | ||
constructor(space, style) { | ||
this.head = ''; | ||
this.tail = ''; | ||
if (space) this.setEncolor(space); | ||
@@ -172,3 +173,3 @@ if (style) this.enstyle(style); | ||
const local = (this == null ? void 0 : (_this$slice = this.slice) == null ? void 0 : _this$slice.call(this)) ?? DyeFab.shallow(); | ||
const local = (this === null || this === void 0 ? void 0 : (_this$slice = this.slice) === null || _this$slice === void 0 ? void 0 : _this$slice.call(this)) ?? DyeFab.shallow(); | ||
if (color) this.encolor.call(local, color); | ||
@@ -181,3 +182,3 @@ return DyeFab.prototype.render.bind(local); | ||
const local = (this == null ? void 0 : (_this$slice2 = this.slice) == null ? void 0 : _this$slice2.call(this)) ?? DyeFab.shallow(); | ||
const local = (this === null || this === void 0 ? void 0 : (_this$slice2 = this.slice) === null || _this$slice2 === void 0 ? void 0 : _this$slice2.call(this)) ?? DyeFab.shallow(); | ||
if (color) this.encolor.call(local, color); | ||
@@ -184,0 +185,0 @@ return DyeFab.prototype.render.call(local, text); |
{ | ||
"name": "@palett/dye-factory", | ||
"version": "0.8.18", | ||
"version": "0.9.0", | ||
"description": "A colorant to string", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.js", | ||
"main": "dist/index.cjs", | ||
"exports": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"files": [ | ||
@@ -20,6 +23,6 @@ "dist" | ||
"@ject/oneself": "^0.0.16", | ||
"@palett/convert": "^0.8.18", | ||
"@palett/enum-ansi-codes": "^0.8.18", | ||
"@palett/enum-color-space": "^0.8.18", | ||
"@palett/util-ansi": "^0.8.18" | ||
"@palett/convert": "^0.9.0", | ||
"@palett/enum-ansi-codes": "^0.9.0", | ||
"@palett/enum-color-space": "^0.9.0", | ||
"@palett/util-ansi": "^0.9.0" | ||
}, | ||
@@ -44,3 +47,3 @@ "repository": { | ||
"homepage": "https://github.com/hoyeungw/palett/dye#readme", | ||
"gitHead": "adf5812e323bc29bdaea384c59716e8c7ba39330" | ||
"gitHead": "edabce66a91b4f0b6ded1274071a2711d0857475" | ||
} |
23669
7
598
+ Added@aryth/math@0.6.9(transitive)
+ Added@ject/oneself@0.0.17(transitive)
+ Added@palett/convert@0.9.19(transitive)
+ Added@palett/enum-ansi-codes@0.9.19(transitive)
+ Added@palett/enum-color-space@0.9.19(transitive)
+ Added@palett/util-ansi@0.9.19(transitive)
- Removed@aryth/math@0.3.26(transitive)
- Removed@palett/convert@0.8.18(transitive)
- Removed@palett/enum-ansi-codes@0.8.18(transitive)
- Removed@palett/enum-color-space@0.8.18(transitive)
- Removed@palett/util-ansi@0.8.18(transitive)
Updated@palett/convert@^0.9.0
Updated@palett/util-ansi@^0.9.0