Skip to content

Commit fc7b553

Browse files
committed
Cleaned up README
1 parent 9189ffb commit fc7b553

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,35 @@ Documentation site: [www.scikitjs.org](https://www.scikitjs.org)
2020

2121
For use with modern bundlers in a frontend application, simply
2222

23-
```js
23+
```bash
2424
npm i scikitjs
2525
```
2626

27+
Usage is similar to other js libraries.
28+
29+
```js
30+
import { LinearRegression } from 'scikitjs'
31+
```
32+
2733
### Backend Users
2834

2935
For Node.js users who wish to bind to the Tensorflow C++ library, simply
3036

37+
```bash
38+
npm i scikitjs
39+
```
40+
41+
But then import the node bindings
42+
43+
```js
44+
import { LinearRegression } from 'scikitjs/node'
45+
```
46+
47+
The `scikitjs/node` path uses the new "exports" feature of node (which is available in node v13.3+).
48+
If you are using an older version of node, simply pass in the path to the cjs build
49+
3150
```js
32-
npm i scikitjs-node
51+
import { LinearRegression } from 'scikitjs/dist/cjs/index.js'
3352
```
3453

3554
### Script src

0 commit comments

Comments
 (0)