MCPcopy Create free account
hub / github.com/totaljs/framework / view_is_assign

Function view_is_assign

internal.js:2399–2441  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

2397}
2398
2399function view_is_assign(value) {
2400
2401 var length = value.length;
2402 var skip = 0;
2403
2404 for (var i = 0; i < length; i++) {
2405
2406 var c = value[i];
2407
2408 if (c === '[') {
2409 skip++;
2410 continue;
2411 }
2412
2413 if (c === ']') {
2414 skip--;
2415 continue;
2416 }
2417
2418 var next = value[i + 1] || '';
2419
2420 if (c === '+' && (next === '+' || next === '=')) {
2421 if (!skip)
2422 return true;
2423 }
2424
2425 if (c === '-' && (next === '-' || next === '=')) {
2426 if (!skip)
2427 return true;
2428 }
2429
2430 if (c === '*' && (next === '*' || next === '=')) {
2431 if (!skip)
2432 return true;
2433 }
2434
2435 if (c === '=') {
2436 if (!skip)
2437 return true;
2438 }
2439 }
2440 return false;
2441}
2442
2443function view_find_command(content, index, entire) {
2444

Callers 1

view_prepareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected