4.0.0 • Published 6 years ago
copilot-util v4.0.0

copilot-util
Condé Nast - copilot JavaScript utilities
Maintainers
- Phil Gold (@pgoldrbx / phil_gold@condenast.com)
- Zack Tollman (@tollman / zackary_tollman@condenast.com)
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
