Move log to utils

This commit is contained in:
Lea Verou
2025-03-17 09:32:07 -04:00
parent e9edc572b5
commit 0cca25a118
2 changed files with 7 additions and 6 deletions

View File

@@ -297,3 +297,8 @@ export function slugify(str) {
.replace(/\s+/g, '-') // Convert whitespace to hyphens
.toLowerCase();
}
export function log(...args) {
console.log(...args);
return args[0];
}

View File

@@ -29,7 +29,7 @@ import {
ROLES,
tints,
} from '/assets/scripts/tweak/data.js';
import { camelCase, capitalize, slugify, subtractAngles } from '/assets/scripts/tweak/util.js';
import { camelCase, capitalize, log, slugify, subtractAngles } from '/assets/scripts/tweak/util.js';
const percentFormatter = value => value.toLocaleString(undefined, { style: 'percent' });
@@ -769,11 +769,7 @@ let paletteAppSpec = {
capitalize,
slugify,
getMaxChroma,
log(...args) {
console.log(...args);
return args[0];
},
log,
/**
* Testing method. Import all core colors from a given palette.