https://github.com/condenast/copilot-util
Condé Nast - Copilot JavaScript utilities
https://github.com/condenast/copilot-util
maintained
Last synced: 6 months ago
JSON representation
Condé Nast - Copilot JavaScript utilities
- Host: GitHub
- URL: https://github.com/condenast/copilot-util
- Owner: CondeNast
- License: mit
- Created: 2014-07-31T00:12:36.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2025-03-24T18:59:17.000Z (7 months ago)
- Last Synced: 2025-04-18T14:23:58.361Z (6 months ago)
- Topics: maintained
- Language: JavaScript
- Homepage: https://www.npmjs.org/package/copilot-util
- Size: 210 KB
- Stars: 8
- Watchers: 188
- Forks: 3
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Authors: AUTHORS
Awesome Lists containing this project
README

# copilot-util
Condé Nast - copilot JavaScript utilities
[](https://travis-ci.org/CondeNast/copilot-util)
[](https://codeclimate.com/github/CondeNast/copilot-util)
[](https://coveralls.io/github/CondeNast/copilot-util?branch=master)## Maintainers
- Zack Tollman ([@tollmanz](https://github.com/tollmanz) / zackary_tollman@condenast.com)
## Install
[](https://nodei.co/npm/copilot-util/)
## Examples
Usage examples can be found in [/examples](examples)
```shell
npm run-script examples
```# API
*
http.request()
*http.response()
*error.HttpError()
*error.TimeoutError()
*json.parse()
---
### HTTP
`http.request(options) => Promise~Response → Buffer`([module](lib/http/request))
`http.response(response) => Promise~Response → Buffer`([module](lib/http/response))
---
### Error
`error.HttpError(message, statusCode) => HttpError`([module](lib/error))
`error.TimeoutError(message, timeout) => TimeoutError`([module](lib/error))
---
### JSON
`json.parse(data) => Promise → Object`([module](lib/json))
___
## Developer
### Lint/Tests
Linting is done through [eslint](http://eslint.org) with settings from `.eslintrc`. This happens automatically as part of the `pretest` script when running tests.
Tests are written with [mocha](https://npmjs.org/package/mocha) and can be run through the npm test script.
```shell
$ npm test
```
## LicenseMIT