Skip to content

Commit

Permalink
fixup! fixup! fixup! docs: document esm features
Browse files Browse the repository at this point in the history
  • Loading branch information
ctavan committed Oct 15, 2019
1 parent 317a672 commit e4ce610
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,10 @@ should not be considered ready for production use and may change or disappear in

## API

### Version 1
### Version 1 (Timestamp + Node)

```javascript
const uuid = require('uuid');
import uuid from 'uuid';

// Incantations
uuid.v1();
Expand Down Expand Up @@ -157,7 +156,7 @@ uuid.v1(null, arr, 16); // ⇨

```

### Version 3
### Version 3 (Namespace)

```javascript
const uuid = require('uuid');
Expand All @@ -184,7 +183,7 @@ uuid.v3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172

```

### Version 4
### Version 4 (Random)

```javascript
const uuid = require('uuid');
Expand Down Expand Up @@ -239,7 +238,7 @@ uuid.v4(null, buffer, 16); // ⇨

```

### Version 5
### Version 5 (Namespace)

```javascript
const uuid = require('uuid');
Expand Down
9 changes: 4 additions & 5 deletions README_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,10 @@ should not be considered ready for production use and may change or disappear in

## API

### Version 1
### Version 1 (Timestamp + Node)

```javascript
const uuid = require('uuid');
import uuid from 'uuid';

// Incantations
uuid.v1();
Expand Down Expand Up @@ -153,7 +152,7 @@ uuid.v1(null, arr, 0); // RESULT
uuid.v1(null, arr, 16); // RESULT
```

### Version 3
### Version 3 (Namespace)

```javascript
const uuid = require('uuid');
Expand All @@ -179,7 +178,7 @@ Example:
uuid.v3('hello world', MY_NAMESPACE); // RESULT
```

### Version 4
### Version 4 (Random)

```javascript
const uuid = require('uuid');
Expand Down Expand Up @@ -220,7 +219,7 @@ uuid.v4(null, buffer, 0); // RESULT
uuid.v4(null, buffer, 16); // RESULT
```

### Version 5
### Version 5 (Namespace)

```javascript
const uuid = require('uuid');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ci": "npm run lint && npm run test && npm run docs:diff",
"md": "runmd --watch --output=README.md README_js.md",
"docs": "npm run package && runmd --output=README.md README_js.md",
"docs:diff": "npm run docs && git diff --quiet README.md",
"docs:diff": "(node --version | grep -vq 'v12' ) || ( npm run docs && git diff --quiet README.md )",
"package": "./scripts/package.sh",
"release": "standard-version"
},
Expand Down

0 comments on commit e4ce610

Please sign in to comment.