copilot-util
v4.0.0
Published
Condé Nast - copilot JavaScript utilities
Readme

copilot-util
Condé Nast - copilot JavaScript utilities
Maintainers
- Phil Gold (@pgoldrbx / [email protected])
- Zack Tollman (@tollman / [email protected])
Install
Examples
Usage examples can be found in /examples
npm run-script examplesAPI
- http.request()
- http.response()
- error.HttpError()
- error.TimeoutError()
- json.parse()
HTTP
http.request(options) => Promise~Response → Buffer (module)
http.response(response) => Promise~Response → Buffer (module)
Error
error.HttpError(message, statusCode) => HttpError (module)
error.TimeoutError(message, timeout) => TimeoutError (module)
JSON
json.parse(data) => Promise → Object (module)
Developer
Lint/Tests
Linting is done through eslint with settings from .eslintrc. This happens automatically as part of the pretest script when running tests.
Tests are written with mocha and can be run through the npm test script.
$ npm testLicense
MIT

