Comparing version 0.2.3 to 0.2.4
@@ -12,1 +12,2 @@ var types = require("ast-types"); | ||
exports.builders = types.builders; | ||
exports.namedTypes = types.namedTypes; |
67
main.js
var fs = require("fs"); | ||
var normalizeOptions = require("./lib/options").normalize; | ||
var types = require("./lib/types"); | ||
var Parser = require("./lib/parser").Parser; | ||
@@ -34,14 +35,58 @@ var Printer = require("./lib/printer").Printer; | ||
exports.run = run; | ||
exports.runFile = runFile; | ||
exports.runString = runString; | ||
Object.defineProperties(exports, { | ||
/** | ||
* Scriptable interface to recast. | ||
*/ | ||
run: { | ||
enumerable: true, | ||
value: run | ||
}, | ||
// Useful utilities for implementing transformer functions. | ||
exports.Syntax = require("./lib/syntax"); | ||
exports.Visitor = require("./lib/visitor").Visitor; | ||
exports.builder = require("./lib/types").builders; | ||
runFile: { | ||
enumerable: true, | ||
value: runFile | ||
}, | ||
// Quick shortcut to the generic pretty-printer. | ||
exports.print = function(node) { | ||
return genericPrinter.printGenerically(node).toString(); | ||
}; | ||
runString: { | ||
enumerable: true, | ||
value: runString | ||
}, | ||
/** | ||
* Useful utilities for implementing transformer functions. | ||
*/ | ||
Syntax: { | ||
enumerable: true, | ||
value: require("./lib/syntax") | ||
}, | ||
Visitor: { | ||
enumerable: true, | ||
value: require("./lib/visitor").Visitor | ||
}, | ||
builder: { // Legacy singular form. | ||
enumerable: false, | ||
value: types.builders | ||
}, | ||
builders: { // Plural preferred. | ||
enumerable: true, | ||
value: types.builders | ||
}, | ||
namedTypes: { | ||
enumerable: true, | ||
value: types.namedTypes | ||
}, | ||
/** | ||
* Quick shortcut to the generic pretty-printer. | ||
*/ | ||
print: { | ||
enumerable: true, | ||
value: function(node) { | ||
return genericPrinter.printGenerically(node).toString(); | ||
} | ||
} | ||
}); |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"homepage": "http://github.com/benjamn/recast", | ||
@@ -18,0 +18,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
352491
10461