MCPcopy
hub / github.com/omgovich/colord / isPresent

Function isPresent

src/helpers.ts:3–7  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1import { ANGLE_UNITS } from "./constants";
2
3export const isPresent = (value: unknown): boolean => {
4 if (typeof value === "string") return value.length > 0;
5 if (typeof value === "number") return true;
6 return false;
7};
8
9export const round = (number: number, digits = 0, base = Math.pow(10, digits)): number => {
10 return Math.round(base * number) / base + 0;

Callers 8

parseXyzaFunction · 0.90
parseLchaFunction · 0.90
parseCmykaFunction · 0.90
parseHslaFunction · 0.90
parseHsvaFunction · 0.90
parseHwbaFunction · 0.90
parseRgbaFunction · 0.90
parseLabaFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…