Closed samboylett closed 5 years ago
Addresses https://github.com/paypal/AATT/issues/45
This lets you use the project as a node module, without the need for running it separately and using the web API.
Example usage:
const { evaluate } = require('aatt'); evaluate({ source: "<html xml:lang='en-gb'><head><title>foo</title></head><body><p>bar</p></body></html>", output: "json", engine: "htmlcs", level: "WCAG2A" }).then(result => { console.log(JSON.parse(result)); });
I have bumped the minor version and set the main to the module.js. Running the project as a node/express website is unaffected by these changes, although the evaluate endpoint uses the module function now.
main
evaluate
Addresses https://github.com/paypal/AATT/issues/45
This lets you use the project as a node module, without the need for running it separately and using the web API.
Example usage:
I have bumped the minor version and set the
main
to the module.js. Running the project as a node/express website is unaffected by these changes, although theevaluate
endpoint uses the module function now.