MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / isTranslated

Function isTranslated

pkg/webui/lib/errors/utils.js:221–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219 * @returns {boolean} `true` if `error` has translation ids, `false` otherwise.
220 */
221export const isTranslated = error =>
222 isBackend(error) ||
223 isFrontend(error) ||
224 (isPlainObject(error) && typeof error.id === 'string' && typeof error.defaultMessage === 'string')
225
226/**
227 * Returns whether `error` is a 'network error' as JavaScript TypeError.

Callers 2

index.jsFile · 0.90
toMessagePropsFunction · 0.85

Calls 2

isBackendFunction · 0.85
isFrontendFunction · 0.85

Tested by

no test coverage detected