@palett/convert
Advanced tools
Comparing version 0.8.15 to 0.8.16
@@ -16,3 +16,3 @@ 'use strict'; | ||
function dil2(hex) { | ||
const hi = hex.length; | ||
const hi = hex == null ? void 0 : hex.length; | ||
if (hi >= 2) return hex; | ||
@@ -23,3 +23,3 @@ if (hi === 1) return '0' + hex; | ||
function dil3(hex) { | ||
const hi = hex.length; | ||
const hi = hex == null ? void 0 : hex.length; | ||
if (hi >= 3) return hex; | ||
@@ -31,3 +31,3 @@ if (hi === 2) return '0' + hex; | ||
function dil6(hex) { | ||
const hi = hex.length; | ||
const hi = hex == null ? void 0 : hex.length; | ||
if (hi >= 6) return hex; | ||
@@ -113,3 +113,3 @@ if (hi === 5) return '0' + hex; | ||
let lo = 0, | ||
hi = hex.length; | ||
hi = hex == null ? void 0 : hex.length; | ||
if (hi === 7) lo++, hi--; | ||
@@ -182,3 +182,3 @@ | ||
let lo = 0, | ||
hi = hex.length; | ||
hi = hex == null ? void 0 : hex.length; | ||
if (hi === 7) lo++, hi--; | ||
@@ -185,0 +185,0 @@ if (hi === 6) return hexAt(hex, lo) << 8 | hexAt(hex, lo += 2) << 4 | hexAt(hex, lo + 2); |
@@ -12,3 +12,3 @@ import { round } from '@aryth/math'; | ||
function dil2(hex) { | ||
const hi = hex.length; | ||
const hi = hex == null ? void 0 : hex.length; | ||
if (hi >= 2) return hex; | ||
@@ -19,3 +19,3 @@ if (hi === 1) return '0' + hex; | ||
function dil3(hex) { | ||
const hi = hex.length; | ||
const hi = hex == null ? void 0 : hex.length; | ||
if (hi >= 3) return hex; | ||
@@ -27,3 +27,3 @@ if (hi === 2) return '0' + hex; | ||
function dil6(hex) { | ||
const hi = hex.length; | ||
const hi = hex == null ? void 0 : hex.length; | ||
if (hi >= 6) return hex; | ||
@@ -109,3 +109,3 @@ if (hi === 5) return '0' + hex; | ||
let lo = 0, | ||
hi = hex.length; | ||
hi = hex == null ? void 0 : hex.length; | ||
if (hi === 7) lo++, hi--; | ||
@@ -178,3 +178,3 @@ | ||
let lo = 0, | ||
hi = hex.length; | ||
hi = hex == null ? void 0 : hex.length; | ||
if (hi === 7) lo++, hi--; | ||
@@ -181,0 +181,0 @@ if (hi === 6) return hexAt(hex, lo) << 8 | hexAt(hex, lo += 2) << 4 | hexAt(hex, lo + 2); |
{ | ||
"name": "@palett/convert", | ||
"version": "0.8.15", | ||
"version": "0.8.16", | ||
"description": "A color converter among RGB, HEX and HSL.", | ||
@@ -18,3 +18,3 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"@aryth/math": "^0.3.19", | ||
"@aryth/math": "^0.3.21", | ||
"@ject/oneself": "^0.0.12" | ||
@@ -45,3 +45,3 @@ }, | ||
"homepage": "https://github.com/hoyeungw/palett/rgb#readme", | ||
"gitHead": "d262ae3420015dc9904fb77ce558ed9fd6d1a4c2" | ||
"gitHead": "163f1bf0ec01a1edadd17a4a5e4b69f2b76fd55f" | ||
} |
15294
Updated@aryth/math@^0.3.21