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

Function endsWith

src/utils/string.js:10–14  ·  view source on GitHub ↗
(text, search)

Source from the content-addressed store, hash-verified

8 * @param {string} search
9 */
10export function endsWith (text, search) {
11 const start = text.length - search.length
12 const end = text.length
13 return (text.substring(start, end) === search)
14}
15
16/**
17 * Format a value of any type into a string.

Callers 3

string.test.jsFile · 0.90
Unit.jsFile · 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…