MCPcopy Create free account
hub / github.com/josdejong/mathjs / looksLikeFraction

Function looksLikeFraction

src/utils/string.js:191–197  ·  view source on GitHub ↗

* Check whether a value looks like a Fraction (unsafe duck-type check) * @param {*} value * @return {boolean}

(value)

Source from the content-addressed store, hash-verified

189 * @return {boolean}
190 */
191function looksLikeFraction (value) {
192 return (value &&
193 typeof value === 'object' &&
194 typeof value.s === 'bigint' &&
195 typeof value.n === 'bigint' &&
196 typeof value.d === 'bigint') || false
197}
198
199/**
200 * Compare two strings

Callers 1

_formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…