4 examples of 'javascript findall' in JavaScript

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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
327find() {
328 switch (this.ormName) {
329 case "mongoose":
330 return this.entity.find();
331 case "sequelize":
332 return this.entity.findAll();
333 }
334}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

86this.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};
112function 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};
3function 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}

Related snippets