MCPcopy Create free account
hub / github.com/TruthHun/BookStack / validUnit

Function validUnit

static/katex/katex.mjs:5193–5199  ·  view source on GitHub ↗
(unit)

Source from the content-addressed store, hash-verified

5191 * or a "size" parse node containing a unit field) is valid.
5192 */
5193const validUnit = function validUnit(unit) {
5194 if (typeof unit !== "string") {
5195 unit = unit.unit;
5196 }
5197
5198 return unit in ptPerUnit || unit in relativeUnit || unit === "ex";
5199};
5200/*
5201 * Convert a "size" parse node (with numeric "number" and string "unit" fields,
5202 * as parsed by functions.js argType "size") into a CSS em value for the

Callers 1

parseSizeGroupMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected