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

Function isBinding

packages/core/ui/builder/component-builder/index.ts:234–242  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

232}
233
234function isBinding(value: any): boolean {
235 let isBinding;
236 if (typeof value === 'string') {
237 const str = value.trim();
238 isBinding = str.indexOf('{{') === 0 && str.lastIndexOf('}}') === str.length - 2;
239 }
240
241 return isBinding;
242}
243
244// For example, ListView.itemTemplateSelector
245const KNOWN_FUNCTIONS = 'knownFunctions';

Callers 1

setPropertyValueFunction · 0.85

Calls 2

indexOfMethod · 0.80
lastIndexOfMethod · 0.80

Tested by

no test coverage detected