Skip to content

Commit

Permalink
chore: Change dist path, conditional export
Browse files Browse the repository at this point in the history
  • Loading branch information
kevee committed Jul 13, 2022
1 parent 599ea45 commit b937cda
Show file tree
Hide file tree
Showing 7 changed files with 1,039 additions and 5 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ yarn add @neaps/tide-prediction
```

## Importing

Using Ecmascript Imports:

```js
import TidePrediction from '@neaps/tide-prediction'
```

Using CommonJS

```js
const TidePrediction = require('@neaps/tide-prediction')

// Before NodeJS version with conditional export support

const TidePrediction = require('@neaps/tide-prediction/dist/commonjs')
```

# Usage

Neaps requires that you [provide your own tidal harmonics information](#constituent-object) to generate a prediction.
Expand All @@ -35,6 +53,7 @@ Note that, for now, Neaps **will not** do any timezone corrections. This means y

```javascript
import TidePrediction from '@neaps/tide-prediction'

const constituents = [
{
phase_GMT: 98.7,
Expand Down
Loading

0 comments on commit b937cda

Please sign in to comment.