How to use @buxlabs/amd-to-es6 - 1 common examples

To help you get started, we’ve selected a few @buxlabs/amd-to-es6 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github piuccio / rollup-plugin-amd / src / index.js View on Github external
transform (code, id) {
            if ( !filter( id ) ) return;
            if ( !firstpass.test( code ) ) return;

            let transformed = convert(code, options.converter);
            if (options.rewire) {
                transformed = transformed.replace(importStatement, (match, begin, moduleId, end) => {
                    return `${begin}${options.rewire(moduleId, id) || moduleId}${end}`;
                });
            }

            return transformed;
        }
    };

@buxlabs/amd-to-es6

convert amd to es6

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular @buxlabs/amd-to-es6 functions