Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "memo-json", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "", | ||
"homepage": "https://github.com/piglovesyou/memo-json", | ||
"main": "lib/index.js", | ||
@@ -6,0 +7,0 @@ "keywords": [], |
@@ -5,5 +5,7 @@ # memo-json | ||
## Install package | ||
To install: | ||
```bash | ||
npm install memo-json | ||
# or | ||
yarn add memo-json | ||
@@ -16,3 +18,3 @@ ``` | ||
// src/data.ts | ||
import {memo} from 'memo' | ||
import { memo } from 'memo-json' | ||
@@ -46,5 +48,20 @@ const getDataMemo = memo(function getData(param: string) { ... }) | ||
* `dir` - Optional, `".memo"` by default. ex. `@memo({ dir: '__generated__' })` | ||
* `enable` - Optional, `true` by default. ex. `@memo({ enable: process.env.NODE_ENV !== 'production' })` | ||
You can own your cusomized `memo()` funciton by `createMemo(opts)`. | ||
```typescript | ||
import { createMemo } from "memo-json"; | ||
const memo = createMemo({ | ||
dir: "__generated", | ||
enable: process.env.NODE_ENV !== "production", | ||
}); | ||
const getDataMemo = memo(function getData() { ... }) | ||
``` | ||
Available options: | ||
- `dir` - Optional string. `".memo"` by default. | ||
- `enable` - Optional boolean. `true` by default. | ||
## CLI | ||
@@ -51,0 +68,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6344
1
77