petal
library for inspecting and renaming various js module formats. This is still WIP but in a usable state.
npm install petal --save
var m = 'vendor/htmlbars-runtime.amd.js' sourceOrAst;mhasDefine // => truemisAnonymous // => true mexports === 'htmlbars-runtime': 'domHelpers' 'Morph' 'htmlbars-runtime/dom_helpers': 'domHelpers' 'htmlbars-runtime/hooks': 'content' 'webComponent' 'webComponentFallback' 'element' 'attribute' 'concat' 'subexpr' 'lookupHelper' 'simple' 'hydrationHooks' 'htmlbars-runtime/utils': 'merge' ); // now, lets remap the current module to another namenewM = m; newMast // => ast remapped regarldess of module format. newMexports === 'htmlbars-runtime@2.0.0': 'domHelpers' 'Morph' 'htmlbars-runtime@2.0.0/dom_helpers': 'domHelpers' 'htmlbars-runtime@2.0.0/hooks': 'content' 'webComponent' 'webComponentFallback' 'element' 'attribute' 'concat' 'subexpr' 'lookupHelper' 'simple' 'hydrationHooks' 'htmlbars-runtime@2.0.0/utils': 'merge' );