Every line of 'javascript findall' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
327 find() { 328 switch (this.ormName) { 329 case "mongoose": 330 return this.entity.find(); 331 case "sequelize": 332 return this.entity.findAll(); 333 } 334 }
86 this.findAll = function findAll(collection, cb) { 87 cb = cb || nop; 88 var col = collections[collection]; 89 if (!col) { 90 cb('Attempt to read from unknown collection "' + collection + '"'); 91 return; 92 } 93 col.find({}).toArray(function(err, items) { 94 if (err) { 95 cb(err); 96 return; 97 } 98 cb(null, items); 99 }); 100 };
112 function findAll(str: string, toFind: string): number[] { 113 var matches = []; 114 var i = str.indexOf(toFind); 115 while (i !== -1) { 116 matches.push(i); 117 i = str.indexOf(toFind, i + toFind.length); 118 } 119 return matches; 120 };
3 function findAll (callback) { 4 // Query DB for a page of customers 5 // Mocked out here as out of scope 6 setImmediate(function () { 7 callback(null, [ 8 {id: 1, name: 'Jane Doe'}, 9 {id: 2, name: 'John Doe'} 10 ]) 11 }) 12 }