Skip to content

Commit

Permalink
fix(readme): Fix how to import the lib
Browse files Browse the repository at this point in the history
  • Loading branch information
nogsantos committed Feb 5, 2018
1 parent 77194a5 commit b39bb11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ npm i -P @nogsantos/hash

<body>

<script src="./dist/hash.umd.min.js"></script>
<script src="./node_modules/@nogsantos/hash/dist/hash.umd.min.js"></script>
<script>
var md5 = new Hash.Md5();
var md5Results = [
Expand All @@ -57,17 +57,17 @@ npm i -P @nogsantos/hash

```

#### Output:
#### Output

![Console](https://res.cloudinary.com/nogsantos/image/upload/v1517849815/Screenshot_from_2018-02-05_14-53-31_qk4smh.png)

### Node

```javascript
const Md5 = require('./dist/hash').Md5;
const Sha1 = require('./dist/hash').Sha1;
const Md5 = require('@nogsantos/hash').Md5;
const Sha1 = require('@nogsantos/hash').Sha1;
// or just
// const { Md5, Sha1} = require('./dist/hash');
// const { Md5, Sha1} = require('@nogsantos/hash');

const md5 = new Md5();
console.log('md5: ', md5.encode('Lorem ipsum dolor sit, amet consectetur adipisicing elit.'));
Expand Down

0 comments on commit b39bb11

Please sign in to comment.