Skip to content

Commit

Permalink
Merge 6d50c16 into feedee5
Browse files Browse the repository at this point in the history
  • Loading branch information
iiddoo committed Sep 15, 2018
2 parents feedee5 + 6d50c16 commit 97a06de
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,27 @@ Retrieve password for user
`npm install @iiddoo/aim-password-retrieve`

## Usage

```javascript
const retriever = require('@iiddoo/aim-password-retrieve');

const pwd = retriever('user');


Output should be `password`

// ES6 async\await
(async () => {
try {
const pwd = await retriever('user');
} catch (error) {
// error handle
}
})();

// Promise
retriever('user')
.then((result) => {
const pwd = result;
})
.catch((error) => {
// error handle
})
```

## Tests

Expand Down

0 comments on commit 97a06de

Please sign in to comment.