Initial commit
This commit is contained in:
8
node_modules/mongoose/lib/helpers/getFunctionName.js
generated
vendored
Normal file
8
node_modules/mongoose/lib/helpers/getFunctionName.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(fn) {
|
||||
if (fn.name) {
|
||||
return fn.name;
|
||||
}
|
||||
return (fn.toString().trim().match(/^function\s*([^\s(]+)/) || [])[1];
|
||||
};
|
||||
Reference in New Issue
Block a user