scratch-parser/index.js
Andrew Sliwinski f7cb29dff6 refactor: Extricates analysis from the scope of this project
Removes the ./lib/analysis module from the scope of this project along with all related
documentation and test coverage.

BREAKING CHANGE: Module no longer provides a _meta object with returned project object.
2018-03-24 11:19:01 -04:00

21 lines
632 B
JavaScript

var async = require('async');
var unpack = require('./lib/unpack');
var parse = require('./lib/parse');
var validate = require('./lib/validate');
/**
* Unpacks, parses, validates, and analyzes Scratch projects. If successful,
* will return a valid Scratch project object with appended metadata.
* @param {Buffer | string} input Buffer or string representing project
* @param {Function} callback Returns error or project data
*/
module.exports = function (input, callback) {
async.waterfall([
function (cb) {
unpack(input, cb);
},
parse,
validate
], callback);
};