Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

memo-json

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memo-json - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

3

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc