chromaticity-color-utilities
Advanced tools
Comparing version 0.8.4-alpha to 0.8.5-alpha
@@ -81,3 +81,3 @@ import * as Colors from './Colors'; | ||
*/ | ||
toString(whitespace?: string | number, quotes?: boolean): string; | ||
toString(whitespace?: string | number, quotes?: boolean, showType?: boolean): string; | ||
to<T extends colorType>(type: string, args?: newColorArgs): T; | ||
@@ -84,0 +84,0 @@ getType(): string; |
@@ -66,5 +66,7 @@ "use strict"; | ||
*/ | ||
colorType.prototype.toString = function (whitespace, quotes) { | ||
colorType.prototype.toString = function (whitespace, quotes, showType) { | ||
if (quotes === void 0) { quotes = true; } | ||
var colon = whitespace ? ': ' : ':'; // only have a space if the string is whitespaced | ||
if (showType === void 0) { showType = true; } | ||
// only have a space if the string is whitespaced | ||
var type = showType ? this.getType() + (whitespace ? ': ' : ':') : ''; | ||
var json = JSON.stringify(this.toStringValues(), null, whitespace); | ||
@@ -74,3 +76,3 @@ if (!quotes) { | ||
} | ||
return this.getType() + colon + json; | ||
return type + json; | ||
}; | ||
@@ -77,0 +79,0 @@ colorType.prototype.to = function (type, args) { |
{ | ||
"name": "chromaticity-color-utilities", | ||
"version": "0.8.4-alpha", | ||
"version": "0.8.5-alpha", | ||
"description": "Color utilities for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.js", |
@@ -179,1 +179,2 @@ # <img src="https://reiniiriarios.github.io/chromaticity-color-utilities/img/chromaticity-icon-01.png" width="26" height="26"> chromaticity-color-utilities | ||
- Support for 8-digit hex values (RRGGBBAA) | ||
- Diagrams in docs |
330372
7597
180