Skip to content

Commit 38eca43

Browse files
author
João Dias
committed
chore(README): updated code examples
1 parent 885bfcf commit 38eca43

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ should be installed as one of your project's `dependencies` or `devDependencies`
7474

7575
```sh
7676
## using npm
77-
npm install --save-dev @feedzai/js-utilities
77+
npm install @feedzai/js-utilities
7878

7979
## using yarn
80-
yarn add --dev @feedzai/js-utilities
80+
yarn add @feedzai/js-utilities
8181

8282
## using pnpm
83-
pnpm add -D @feedzai/js-utilities
83+
pnpm add @feedzai/js-utilities
8484
```
8585

8686
## Usage
@@ -96,10 +96,16 @@ To import a piece of code into your javascript project just do:
9696

9797
```js
9898
// Just one function
99-
import { throwError } from "@feedzai/js-utilities";
99+
import { isNil } from "@feedzai/js-utilities";
100+
101+
// Just a single module, with the full path to the file
102+
import isNil from "@feedzai/js-utilities/dist/functions/typed/is-nil";
100103

101104
// Multiple functions
102-
import { callIfExists, throwError, getLSItem, useConstant } from "@feedzai/js-utilities";
105+
import { callIfExists, throwError, getLSItem } from "@feedzai/js-utilities";
106+
107+
// React Hooks
108+
import { useMount, useConstant } from "@feedzai/js-utilities/hooks";
103109

104110
// Alias the whole object
105111
import * as JS_UTILS from "@feedzai/js-utilities";

0 commit comments

Comments
 (0)