MCPcopy Create free account
hub / github.com/avoidwork/tenso / id

Function id

src/utils/id.js:10–13  ·  view source on GitHub ↗
(arg = EMPTY)

Source from the content-addressed store, hash-verified

8 * @returns {boolean} True if the string matches ID patterns, false otherwise
9 */
10export function id (arg = EMPTY) {
11 // Only match strings that don't contain whitespace or special characters before the id suffix
12 return pattern.test(arg) && !(/[\s\-.@]/).test(arg);
13}

Callers 2

marshalFunction · 0.90
utils-id.test.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected