MCPcopy Create free account
hub / github.com/ampproject/amphtml / userAssertString

Function userAssertString

src/core/assert/user.js:86–92  ·  view source on GitHub ↗
(shouldBeString, opt_message)

Source from the content-addressed store, hash-verified

84 * @throws {Error} when shouldBeString is not an String
85 */
86export function userAssertString(shouldBeString, opt_message) {
87 return assertions.assertString(
88 /** @type {import('./base').AssertionFunctionDef} */ (userAssert),
89 shouldBeString,
90 opt_message
91 );
92}
93
94/**
95 * Throws an error if the first argument isn't a number. The allowed values

Callers

nothing calls this directly

Calls 1

assertStringMethod · 0.80

Tested by

no test coverage detected