open-index/open-npm huggingface dataset:
npm package: @memoize/getters
Description: Commit a getter's result for one-time evaluation.
Latest version: 0.0.1

# `@memoize/getters`

Commit a getter's result for one-time evaluation.

## 🚀 Usage

```ts
import { memoize_getters } from "@memoize/getters";

const myObject = memoize_getters({
  get answer() {
    return discover_the_meaning_of_life();
  },
});

myObject.answer; // 42
```

Where ordinarily, that would look like `{ answer: discover_the_meaning_of_life() }` for a value somebody may never read.

## ❤️ Thanks

Special thanks to [@wongmjane](http://twitter.com/wongmjane) for the implementation and idea!

## License

MIT © [Marais Rossouw](https://marais.io)