New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@gotoeasy/babel

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gotoeasy/babel

使用固定配置让babel转译代码,简化满足特定需求:语法转译+按需添加兼容补丁

latest
Source
npmnpm
Version
0.5.3
Version published
Maintainers
1
Created
Source

@gotoeasy/babel

使用固定配置让babel转译代码,简化满足特定需求:语法转译+按需添加兼容补丁

NPM version License

Sample

const babel = require('@gotoeasy/babel');

let code = `
    let fn = (...args) => args.includes('y') ? Promise.resolve(args) : Promise.reject(args);
`;

console.info(babel(code));

// 文件.browserslistrc配置为`chrome 60`时转译结果如下
/*
"use strict";

let fn = (...args) => args.includes('y') ? Promise.resolve(args) : Promise.reject(args);
*/

// 文件.browserslistrc配置为`ie 11`时转译结果如下
/*
"use strict";

require("core-js/modules/es6.promise");

require("core-js/modules/es7.array.includes");

require("core-js/modules/es6.string.includes");

var fn = function fn() {
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }

  return args.includes('y') ? Promise.resolve(args) : Promise.reject(args);
};
*/

Keywords

gotoeasy

FAQs

Package last updated on 14 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts