"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/babel-plugin-proposal-numeric-separator/src/index.js" between
babel-7.12.6.tar.gz and babel-7.12.7.tar.gz

About: Babel is a JavaScript compiler that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript. Hint: There exists a high-performance language interoperability tool also named "Babel".

index.js  (babel-7.12.6):index.js  (babel-7.12.7)
skipping to change at line 12 skipping to change at line 12
import syntaxNumericSeparator from "@babel/plugin-syntax-numeric-separator"; import syntaxNumericSeparator from "@babel/plugin-syntax-numeric-separator";
/** /**
* Given a bigIntLiteral or NumericLiteral, remove numeric * Given a bigIntLiteral or NumericLiteral, remove numeric
* separator `_` from its raw representation * separator `_` from its raw representation
* *
* @param {NodePath<BigIntLiteral | NumericLiteral>} { node }: A Babel AST node path * @param {NodePath<BigIntLiteral | NumericLiteral>} { node }: A Babel AST node path
*/ */
function remover({ node }: NodePath<BigIntLiteral | NumericLiteral>) { function remover({ node }: NodePath<BigIntLiteral | NumericLiteral>) {
const { extra } = node; const { extra } = node;
if (extra && extra.raw.includes("_")) { if (extra?.raw?.includes("_")) {
extra.raw = extra.raw.replace(/_/g, ""); extra.raw = extra.raw.replace(/_/g, "");
} }
} }
export default declare(api => { export default declare(api => {
api.assertVersion(7); api.assertVersion(7);
return { return {
name: "proposal-numeric-separator", name: "proposal-numeric-separator",
inherits: syntaxNumericSeparator, inherits: syntaxNumericSeparator,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)