Open timfish opened 5 months ago
const { init, parse } = require('es-module-lexer') init.then(() => { const [imports, ex] = parse(` const o = { name5: 1, name6: 1 } export const { name5, name6: bar } = o` ) console.log(imports, ex) })
Outputs
[] [ { s: 49, e: 54, ls: 49, le: 54, n: 'name5', ln: 'name5' }, { s: 56, e: 61, ls: 56, le: 61, n: 'name6', ln: 'name6' } ]
But there should be a bar export instead of name6.
bar
name6
Note the above should read:
[] [ { s: 49, e: 54, ls: 49, le: 54, n: 'name5', ln: 'name5' }, { s: 56, e: 61, ls: 56, le: 61, n: 'bar', ln: 'bar' } ]
Outputs
But there should be a
bar
export instead ofname6
.