How to use the enketo-transformer.transform function in enketo-transformer

To help you get started, we’ve selected a few enketo-transformer 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 enketo / enketo-core / Gruntfile.js View on Github external
.reduce( ( prevPromise, filePath ) => prevPromise.then( () => {
                const xformStr = grunt.file.read( filePath );
                grunt.log.writeln( `Transforming ${filePath}...` );
                return transformer.transform( { xform: xformStr } )
                    .then( result => {
                        forms[ filePath.substring( filePath.lastIndexOf( '/' ) + 1 ) ] = {
                            html_form: result.form,
                            xml_model: result.model
                        };
                    } );
            } ), Promise.resolve() )
            .then( () => {

enketo-transformer

Library that transforms ODK-compliant XForms into a format that Enketo can consume

Apache-2.0
Latest version published 4 months ago

Package Health Score

73 / 100
Full package analysis

Popular enketo-transformer functions