4.0.0 • Published 4 years ago

copilot-util v4.0.0

Weekly downloads
6,772
License
MIT
Repository
github
Last release
4 years ago

Logo

copilot-util

Condé Nast - copilot JavaScript utilities

Build Status Code Climate Coverage Status

Maintainers

  • Phil Gold (@pgoldrbx / phil_gold@condenast.com)
  • Zack Tollman (@tollman / zackary_tollman@condenast.com)

Install

NPM

Examples

Usage examples can be found in /examples

npm run-script examples

API

  • 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 test

License

MIT

4.0.0

4 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.0

8 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.4.0

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago