怎么查看babel-preset-es2015有没有安装

2025-05-01 17:10:47
推荐回答(2个)
回答1:

babel-preset-2015打开babel-preset2015插件一看,一共20个插件。熟悉es2015语法的同志一看,多多少少能从字面意思知道某个插件是用于哪种语法的转换babel-plugin-transform-es2015-template-literals=>es2015模板babel-plugin-transform-es2015-literalsbabel-plugin-transform-es2015-function-name=>函数name属性babel-plugin-transform-es2015-arrow-functions=>箭头函数babel-plugin-transform-es2015-block-scoped-functions=>函数块级作用域babel-plugin-transform-es2015-classes=>class类babel-plugin-transform-es2015-object-super=>super提供了调用prototype的方式babel-plugin-transform-es2015-shorthand-properties=>对象属性的快捷定义,如obj={x,y}babel-plugin-transform-es2015-computed-properties=>对象中括号属性,如obj={['x]:1}babel-plugin-transform-es2015-for-of=>对象forof遍历babel-plugin-transform-es2015-sticky-regexbabel-plugin-transform-es2015-unicode-regexbabel-plugin-check-es2015-constants=>const常量babel-plugin-transform-es2015-spread=>对象扩展运算符属性,如foobarbabel-plugin-transform-es2015-parameters=>函数参数默认值及扩展运算符babel-plugin-transform-es2015-destructuring=>赋值解构babel-plugin-transform-es2015-block-scoping=>let和const块级作用域babel-plugin-transform-es2015-typeof-symbol=>symbol特性babel-plugin-transform-es2015-modules-commonjs=>commonjs模块加载babel-plugin-transform-regenerator=>generator特性

回答2:

方法:
Check if this entry is a directory or a file.
const size_t filenameLength = strlen(fileName);
if (fileName[filenameLength-1] == '/')
{
{