constant
安装
npm安装
$ npm install simple-const
或者使用yarn
$ yarn add simple-const
使用
//直接给constant赋值constantconst_name = 'const_value'; //取值console; // const_value // 不可以重复赋值constantconst_name = 'new value'; // not change // 不可以deletedelete constantconst_name; // false // 通过defineProperty或者defineProperties修改不生效Object;console; // const_value // 通过parse解析键值对常量; console; // new value