| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/vhosts/convo/node_modules/es5-ext/string/ |
Upload File : |
'use strict';
var isCallable = require('../object/is-callable')
, value = require('../object/valid-value')
, call = Function.prototype.call;
module.exports = function (fmap) {
fmap = Object(value(fmap));
return function (pattern) {
var context = value(this);
pattern = String(pattern);
return pattern.replace(/%([a-zA-Z]+)|\\([\u0000-\uffff])/g,
function (match, token, escape) {
var t, r;
if (escape) return escape;
t = token;
while (t && !(r = fmap[t])) t = t.slice(0, -1);
if (!r) return match;
if (isCallable(r)) r = call.call(r, context);
return r + token.slice(t.length);
});
};
};