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

Function validUnit

static/katex/katex.js:5207–5213  ·  view source on GitHub ↗
(unit)

Source from the content-addressed store, hash-verified

5205 * or a "size" parse node containing a unit field) is valid.
5206 */
5207var validUnit = function validUnit(unit) {
5208 if (typeof unit !== "string") {
5209 unit = unit.unit;
5210 }
5211
5212 return unit in ptPerUnit || unit in relativeUnit || unit === "ex";
5213};
5214/*
5215 * Convert a "size" parse node (with numeric "number" and string "unit" fields,
5216 * as parsed by functions.js argType "size") into a CSS em value for the

Callers 1

katex.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected