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

Function isNamedParam

packages/core/ui/builder/binding-builder.ts:22–32  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

20export const parentsRegex = /\$parents\s*\[\s*(['"]*)\w*\1\s*\]/g;
21
22function isNamedParam(value) {
23 const equalSignIndex = value.search(hasEqualSignRegex);
24 if (equalSignIndex > -1) {
25 const equalSignSurround = value.substr(equalSignIndex > 0 ? equalSignIndex - 1 : 0, 3);
26 if (equalSignSurround.search(equalSignComparisionOperatorsRegex) === -1) {
27 return true;
28 }
29 }
30
31 return false;
32}
33
34function areNamedParams(params: Array<any>) {
35 for (let i = 0; i < params.length; i++) {

Callers 1

areNamedParamsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected