Search
Write a publication
Pull to refresh
0
0

User

Send message
Там 90% кода это защита от деобфускации.
Код вроде экспортирует какую-то функцию фильтрации, примерно так:
module.exports = function(source, fn, target) {
  var hasOwnProperty = Object.prototype.hasOwnProperty;
  if (source.filter)
    return source.filter(fn, target);

  if (undefined === source || null === source)
    throw new TypeError();
  if ('function' != typeof fn)
    throw new TypeError();

  var res = [];
  for (var i = 0; i < source.length; i++) {
    if (!hasOwnProperty.call(source, i))
      continue;
      var el = source[i];
    if (fn.call(target, el, i, source))
      res.push(el);
  }
  return res;
};

Information

Rating
Does not participate
Location
Москва и Московская обл., Россия
Registered
Activity