Commit With Frontend and Backend in MERN
This commit is contained in:
12
backend/node_modules/mongoose/lib/helpers/once.js
generated
vendored
Normal file
12
backend/node_modules/mongoose/lib/helpers/once.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function once(fn) {
|
||||
let called = false;
|
||||
return function() {
|
||||
if (called) {
|
||||
return;
|
||||
}
|
||||
called = true;
|
||||
return fn.apply(null, arguments);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user