Skip to content

Commit

Permalink
Add example with ECMAScript modules (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
paldepind authored and rpominov committed Feb 11, 2018
1 parent b670feb commit fc5ef4c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,29 @@ class MyType = {
export {MyType}
```


#### Example 3. Static Land module as ECMAScript modules

```js
// mytype.js

// Static Land methods

export function of(x) {
// ...
}

export function map(fn, value) {
// ...
}
```

Import as

```js
import * as MyType from "./mytype" // MyType is now a Static Land module
```

### Compatible libraries

We have a list in the wiki. Feel free to add your library there.
Expand Down

0 comments on commit fc5ef4c

Please sign in to comment.