How to use the @babel/runtime-corejs3/core-js/json/stringify 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 / promise / index.js View on Github external
window.addEventListener('unhandledrejection', function (event) {
      // reason可能是正常的字符串, 也可能会有message和stack信息
      // 如果有的话, 就抓一下
      var promiseErrorInfo = '';
      var reason = '';

      try {
        promiseErrorInfo = _JSON$stringify(_.get(event, ['promise'], ''));
        reason = _JSON$stringify(_.get(event, ['reason'], ''));
      } catch (e) {
        console.log('promise stringify出错===>' + e);
        promiseErrorInfo = _.get(event, ['promise'], '') + ''; // 稳稳的 [object Promise]

        reason = _.get(event, ['reason'], '') + '';
      }

      var message = _.get(event, ['reason', 'message'], '');

      var stack = _.get(event, ['reason', 'stack'], '');

      var desc = "Unhandled_Rejection:" + promiseErrorInfo; // 这里也去调用

      if (desc && stack) {
        var _context;
github LianjiaTech / fee / sdk / lib / promise / index.js View on Github external
window.addEventListener('unhandledrejection', function (event) {
      // reason可能是正常的字符串, 也可能会有message和stack信息
      // 如果有的话, 就抓一下
      var promiseErrorInfo = '';
      var reason = '';

      try {
        promiseErrorInfo = _JSON$stringify(_.get(event, ['promise'], ''));
        reason = _JSON$stringify(_.get(event, ['reason'], ''));
      } catch (e) {
        console.log('promise stringify出错===>' + e);
        promiseErrorInfo = _.get(event, ['promise'], '') + ''; // 稳稳的 [object Promise]

        reason = _.get(event, ['reason'], '') + '';
      }

      var message = _.get(event, ['reason', 'message'], '');

      var stack = _.get(event, ['reason', 'stack'], '');

      var desc = "Unhandled_Rejection:" + promiseErrorInfo; // 这里也去调用

      if (desc && stack) {
        var _context;