Skip to content

Commit

Permalink
Update package
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterbulten committed Jan 20, 2019
1 parent d80acbe commit 7650e87
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
lib

libtest
*.log
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,53 @@ Include the `kalman.js` or `kalman.min.js` from the `dist` folder on your webpag
</script>
```

Should output (with default settings):

```
3
2.3333333333333335
1.5000000000000002
```

### Node (es6)
`npm install kalmanjs`

```javascript
import KalmanFilter from 'kalmanjs';

const kf = new KalmanFilter();
kf.filter(2);
console.log(kf.filter(3));
console.log(kf.filter(2));
console.log(kf.filter(1));
```

Should output (with default settings):

```
3
2.3333333333333335
1.5000000000000002
```

### Node (es5)
`npm install kalmanjs`

```javascript
var KalmanFilter = require('kalmanjs').default;
var KalmanFilter = require('kalmanjs');

var kf = new KalmanFilter();
kf.filter(2);
console.log(kf.filter(3));
console.log(kf.filter(2));
console.log(kf.filter(1));

```

Should output (with default settings):

```
3
2.3333333333333335
1.5000000000000002
```

## Applying the filter on a dataset
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kalmanjs",
"version": "1.1.0-beta",
"version": "1.1.0",
"private": false,
"devDependencies": {
"@babel/cli": "^7.2.3",
Expand All @@ -25,7 +25,7 @@
"compile": "npx babel src --source-maps --out-dir lib",
"minify": "npx uglifyjs dist/kalman.js --beautify \"beautify=false, preamble='/*kalmanjs, Wouter Bulten, MIT, https://github.com/wouterbulten/kalmanjs */'\" --compress --source-map \"content='dist/kalman.js.map'\" --mangle -o dist/kalman.min.js",
"build": "npx rollup -c",
"prepublish": "npm run build"
"prepublishOnly": "npm run build"
},
"keywords": [
"kalman",
Expand Down

0 comments on commit 7650e87

Please sign in to comment.