# immutablejs-record-memoize

> Memoize methods and properties of ImmutableJS.Record

Latest version **1.0.1** (published 2019-01-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install immutablejs-record-memoize
pnpm add immutablejs-record-memoize
yarn add immutablejs-record-memoize
bun add immutablejs-record-memoize
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-01-06 |
| First published | 2017-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 147.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Soreine |
| Maintainers | soreine |
| Keywords | immutable, record, memoize |

## Links

- npm: https://www.npmjs.com/package/immutablejs-record-memoize
- Repository: https://github.com/Soreine/immutablejs-record-memoize
- Homepage: https://github.com/Soreine/immutablejs-record-memoize#readme
- Issues: https://github.com/Soreine/immutablejs-record-memoize/issues
- npm.io page: https://npm.io/package/immutablejs-record-memoize

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-01-06
- 1.0.0 — 2017-08-11

## README

# immutablejs-record-memoize

[![npm](https://img.shields.io/npm/v/immutablejs-record-memoize.svg?style=flat-square)](https://www.npmjs.com/package/immutablejs-record-memoize)

Memoize methods or properties of any `ImmutableJS.Record`. Also works on any immutable object prototype.

## Install

```
yarn add immutablejs-record-memoize
```

## Usage

With `ImmutableJS.Record`:

```js
import memoize from 'immutablejs-record-memoize';

class ExampleRecord extends Record({}) {
    noArguments() {
        // ...
    },

    withArguments(a, b, c) {
        // ...
    }
}

memoize(ExampleRecord.prototype, ['noArguments', 'withArguments']);

// Use ExampleRecord as usual
```

For other object's prototypes:

```js
import memoize from 'immutablejs-record-memoize';

function ExampleObject() {
    constructor() {
        // ...
    }
}

ExampleObject.prototype = {
    noArguments() {
        // ...
    },

    withArguments(a, b, c) {
        // ...
    }
};

// Memoize methods with no arguments
memoize(ExampleObject.prototype, ['noArguments', 'withArguments']);

// Use ExampleObject as usual
```

## Reference

### `memoize`

Memoize the given properties of the given prototype object. The prototype is mutated.

Arguments:

- `prototype: Object`
  The object prototype that should have its properties memoized.
- `properties: string[]`
  The list of properties names that should be memoized

Returns: `void`


## Credits

Implementation is taken from Slate.
https://github.com/ianstormtaylor/slate/blob/master/src/utils/memoize.js

Thank you to:

- [@zhujinxuan](https://github.com/zhujinxuan)

---
_Source: https://npm.io/package/immutablejs-record-memoize · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
