mirror of
https://github.com/scratchfoundation/scratch-parser.git
synced 2025-08-28 22:18:45 -04:00
Initial WIP commit with streaming parser
This commit is contained in:
parent
41119c5869
commit
4642c66e08
10 changed files with 260 additions and 1 deletions
13
index.js
Normal file
13
index.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
var validate = require('./lib/validate');
|
||||
var parse = require('./lib/parse');
|
||||
|
||||
module.exports = function (input, callback) {
|
||||
parse(input, function (err, project) {
|
||||
if (err) return callback(err);
|
||||
|
||||
validate(project, function (err) {
|
||||
if (err) return callback(err);
|
||||
callback(null, project);
|
||||
});
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue