'use strict';

/**
* Calculate source lines of code (SLOC) for list of JavaScript files.
*
* @module @stdlib/_tools/js/sloc-file-list
*
* @example
* var analyze = require( '@stdlib/_tools/js/sloc-file-list' );
*
* var files = [ __filename ];
*
* analyze( files, clbk );
*
* function clbk( error, results ) {
*     if ( error ) {
*         throw error;
*     }
*     console.log( JSON.stringify( results ) );
* }
*
* @example
* var analyze = require( '@stdlib/_tools/js/sloc-file-list' ).sync;
*
* var files = [ __filename ];
*
* var results = analyze( files );
* if ( results instanceof Error ) {
*     throw results;
* }
* console.log( JSON.stringify( results ) );
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var analyze = require( './main.js' );
var sync = require( './sync.js' );


// MAIN //

setReadOnly( analyze, 'sync', sync );


// EXPORTS //

module.exports = analyze;

'use strict';

/**
* Calculate source lines of code (SLOC) for a list of JavaScript files.
*
* @module @stdlib/_tools/static-analysis/js/sloc-file-list
*
* @example
* var analyze = require( '@stdlib/_tools/static-analysis/js/sloc-file-list' );
*
* var files = [ __filename ];
*
* analyze( files, clbk );
*
* function clbk( error, results ) {
*     if ( error ) {
*         throw error;
*     }
*     console.log( JSON.stringify( results ) );
* }
*
* @example
* var analyze = require( '@stdlib/_tools/static-analysis/js/sloc-file-list' ).sync;
*
* var files = [ __filename ];
*
* var results = analyze( files );
* if ( results instanceof Error ) {
*     throw results;
* }
* console.log( JSON.stringify( results ) );
*/

// MODULES //

var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var analyze = require( './main.js' );
var sync = require( './sync.js' );


// MAIN //

setReadOnly( analyze, 'sync', sync );


// EXPORTS //

module.exports = analyze;

Fix require paths and description
Fix require paths and description
