📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-06-30 10:35:47
📂
/ (Root)
/
home
/
orkouolp
/
nodevenv
/
node_js
/
orkofarms.com
/
18
/
lib
/
node_modules
/
stubs
📍 /home/orkouolp/nodevenv/node_js/orkofarms.com/18/lib/node_modules/stubs
🔄 Refresh
✏️
Editing: index.js
Writable
'use strict' module.exports = function stubs(obj, method, cfg, stub) { if (!obj || !method || !obj[method]) throw new Error('You must provide an object and a key for an existing method') if (!stub) { stub = cfg cfg = {} } stub = stub || function() {} cfg.callthrough = cfg.callthrough || false cfg.calls = cfg.calls || 0 var norevert = cfg.calls === 0 var cached = obj[method].bind(obj) obj[method] = function() { var args = [].slice.call(arguments) var returnVal if (cfg.callthrough) returnVal = cached.apply(obj, args) returnVal = stub.apply(obj, args) || returnVal if (!norevert && --cfg.calls === 0) obj[method] = cached return returnVal } }
💾 Save Changes
❌ Cancel