Skip to content

Commit 9999299

Browse files
committed
Update documentation for CJS support
1 parent f65057a commit 9999299

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Readme.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,23 @@ $ dateformat --help
1717

1818
## Usage
1919

20-
As taken from Steven's post, modified to match the Modifications listed above:
20+
This module supports both ESM and CJS formats.
21+
22+
ESM:
2123

2224
```js
2325
import dateFormat, { masks } from "dateformat";
26+
```
27+
28+
CJS:
29+
30+
```js
31+
const dateFormat = require("dateformat");
32+
```
33+
34+
As taken from Steven's post, modified to match the Modifications listed above:
35+
36+
```js
2437
const now = new Date();
2538

2639
// Basic usage

0 commit comments

Comments
 (0)