How to use the @babel/runtime-corejs3/core-js/instance/filter function in @babel/runtime-corejs3

To help you get started, we’ve selected a few @babel/runtime-corejs3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LianjiaTech / fee / sdk / lib / first-screen-loading-time / watch_render.js View on Github external
requestAnimationFrame(function () {
    // 在这里先筛选出首屏得元素
    var height = document.documentElement.clientHeight;
    var width = document.documentElement.clientWidth; // 筛选出top和left在 width和height得元素

    var firstScreenDoms = _filterInstanceProperty(initDoms).call(initDoms, function (item) {
      var dom = item.dom;

      var _getOffset = getOffset(dom),
          left = _getOffset.left,
          top = _getOffset.top;

      return left <= width && top <= height;
    }); // 找出最大得时间


    _sortInstanceProperty(firstScreenDoms).call(firstScreenDoms, function (itemA, itemB) {
      return itemB.time - itemA.time;
    }); // const maxTime = firstScreenDoms.reduce((item, time = 0) => item.time > time ? item.time : time)


    var firstScreenLoadingTime = firstScreenDoms[0] ? firstScreenDoms[0].time : 0;
github LianjiaTech / fee / sdk / lib / utils.js View on Github external
export var get = function get(object, path, defaultValue) {
  var _context;

  var _path = getTag(path) === '[object Array]' ? path : _filterInstanceProperty(_context = String.prototype.split.call(path, /[,[\].]+?/)).call(_context, Boolean);

  var index = 0;
  var length = _path.length;

  var result = function () {
    while (object != null && index < length) {
      object = object[_path[index++]];
    }

    return index && index == length ? object : undefined;
  }();

  return result === undefined ? defaultValue : result;
};
/**