MCPcopy Index your code
hub / github.com/totaljs/framework / findItems

Function findItems

nosql.js:2403–2417  ·  view source on GitHub ↗
(items, field, value)

Source from the content-addressed store, hash-verified

2401}
2402
2403function findItems(items, field, value) {
2404 var arr = [];
2405 for (var i = 0, length = items.length; i < length; i++) {
2406 if (value instanceof Array) {
2407 for (var j = 0; j < value.length; j++) {
2408 if (items[i][field] === value[j]) {
2409 arr.push(items[i]);
2410 break;
2411 }
2412 }
2413 } else if (items[i][field] === value)
2414 arr.push(items[i]);
2415 }
2416 return arr;
2417}
2418
2419DatabaseBuilder.prototype.join = function(field, name) {
2420 var self = this;

Callers 1

nosql.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected