Package Exports
- @bevry/memo
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bevry/memo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@bevry/memo
Wrap a function in a memo to reuse the first invocation result of the function
Usage
import memo from '@bevry/memo'
let count = 0
function counter() {
return ++count
}
const counterMemo = memo(counter)
counterMemo() // returns 1
counterMemo() // returns 1
Install
- Install:
npm install --save @bevry/memo
- Import:
import pkg from ('@bevry/memo')
- Require:
const pkg = require('@bevry/memo').default
<script type="module">
import pkg from '//cdn.pika.dev/@bevry/memo/^3.3.0'
</script>
<script type="module">
import pkg from '//unpkg.com/@bevry/memo@^3.3.0'
</script>
<script type="module">
import pkg from '//dev.jspm.io/@bevry/memo@3.3.0'
</script>
Editions
This package is published with the following editions:
@bevry/memo/source/index.ts
is TypeScript source code with Import for modules@bevry/memo
aliases@bevry/memo/edition-esnext/index.js
@bevry/memo/edition-esnext/index.js
is TypeScript compiled against ESNext for Node.js with Require for modules@bevry/memo/edition-browsers/index.js
is TypeScript compiled against ES2019 for web browsers with Import for modules
History
Discover the release history by heading on over to the HISTORY.md
file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Backers
Maintainers
These amazing people are maintaining this project:
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
License
Unless stated otherwise all works are:
- Copyright © 2019+ Benjamin Lupton
and licensed under: