Skip to content

Commit

Permalink
Upgrade package to TypeScript, latest Popsicle
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Nov 5, 2019
1 parent 6cfb1fb commit 390512c
Show file tree
Hide file tree
Showing 11 changed files with 10,725 additions and 81 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
coverage
node_modules
coverage/
node_modules/
dist/
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Greenkeeper badge](https://badges.greenkeeper.io/blakeembrey/popsicle-basic-auth.svg)](https://greenkeeper.io/)

> Add basic authentication to requests.
Expand All @@ -16,12 +15,12 @@ npm install popsicle-basic-auth --save

## Usage

```javascript
var request = require('popsicle')
var auth = require('popsicle-basic-auth')
```js
import { middleware, toFetch } from "popsicle";
import { Request } from "popsicle/dist/node";
import { auth } from "popsicle-basic-auth";

request('/users.json')
.use(auth('blakeembrey', 'hunter2'))
const fetch = toFetch([auth("blakeembrey", "hunter2"), middleware], Request);
```

## License
Expand Down
Loading

0 comments on commit 390512c

Please sign in to comment.