MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / isFileOrResourcePath

Function isFileOrResourcePath

packages/core/utils/common.ts:85–96  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

83}
84
85export function isFileOrResourcePath(path: string): boolean {
86 if (!types.isString(path)) {
87 return false;
88 }
89
90 return (
91 path.indexOf('~/') === 0 || // relative to AppRoot
92 path.indexOf('/') === 0 || // absolute path
93 path.indexOf(RESOURCE_PREFIX) === 0 ||
94 path.indexOf(SYSTEM_PREFIX) === 0
95 ); // resource
96}
97
98export function isFontIconURI(uri: string): boolean {
99 if (!types.isString(uri)) {

Callers 6

createUIImageFromURIFunction · 0.90
refreshBorderDrawableFunction · 0.90

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected