Skip to content

Commit 2d7efe6

Browse files
author
Kevin Miller
authored
Merge pull request #151 from jphastings/patch-1
Update the package name
2 parents 4451fbf + 83e8e04 commit 2d7efe6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ yarn add @neaps/tide-prediction
3030
You can import the module using Ecmascript, or CommonJS. Note that the CommonJS export is transpiled, so deep debugging the module that way will be difficult.
3131

3232
```js
33-
import TidePrediction from '@neaps/tide-prediction'
34-
const TidePrediction = require('@neaps/tide-prediction')
33+
import TidePredictor from '@neaps/tide-predictor'
34+
const TidePredictor = require('@neaps/tide-predictor')
3535
```
3636

3737
There are also packaged and minified versions for the browser in `dist/web`.
@@ -45,7 +45,7 @@ Because many constituent datum come with multiple phases (in the case of NOAA's
4545
Note that, for now, Neaps **will not** do any timezone corrections. This means you need to pass date objects that align with whatever timezone the constituents are in.
4646

4747
```javascript
48-
import TidePrediction from '@neaps/tide-prediction'
48+
import TidePredictor from '@neaps/tide-predictor'
4949

5050
const constituents = [
5151
{
@@ -58,7 +58,7 @@ const constituents = [
5858
//....there are usually many, read the docs
5959
]
6060

61-
const highLowTides = tidePrediction(constituents, {
61+
const highLowTides = TidePredictor(constituents, {
6262
phaseKey: 'phase_GMT'
6363
}).getExtremesPrediction({
6464
start: new Date('2019-01-01'),
@@ -68,7 +68,7 @@ const highLowTides = tidePrediction(constituents, {
6868

6969
## Tide prediction object
7070

71-
Calling `tidePrediction` will generate a new tide prediction object. It accepts the following arguments:
71+
Calling `tidePredictor` will generate a new tide prediction object. It accepts the following arguments:
7272

7373
- `constituents` - An array of [constituent objects](#constituent-object)
7474
- `options` - An object with one of:
@@ -86,7 +86,7 @@ Returns the predicted high and low tides between a start and end date.
8686
```javascript
8787
const startDate = new Date()
8888
const endDate = new Date(startDate + 3 * 24 * 60 * 60 * 1000)
89-
const tides = tidePrediction(constituents).getExtremesPrediction({
89+
const tides = TidePredictor(constituents).getExtremesPrediction({
9090
start: startDate,
9191
end: endDate,
9292
labels: {
@@ -100,7 +100,7 @@ const tides = tidePrediction(constituents).getExtremesPrediction({
100100
If you want predictions for a subservient station, first set the reference station in the prediction, and pass the [subservient station offests](#subservient-station) to the `getExtremesPrediction` method:
101101

102102
```javascript
103-
const tides = tidePrediction(constituents).getExtremesPrediction({
103+
const tides = TidePredictor(constituents).getExtremesPrediction({
104104
start: startDate,
105105
end: endDate,
106106
offset: {
@@ -143,7 +143,7 @@ High and low tides are returned as arrays of objects:
143143
Gives you the predicted water level at a specific time.
144144

145145
```javascript
146-
const waterLevel = tidePrediction(constituents).getWaterLevelAtTime({
146+
const waterLevel = TidePredictor(constituents).getWaterLevelAtTime({
147147
time: new Date()
148148
})
149149
```

0 commit comments

Comments
 (0)