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

lomemo

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lomemo

Lodash's memoize function, but in a much smaller package than lodash.memoize's.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8K
decreased by-6.11%
Maintainers
1
Weekly downloads
 
Created
Source

Lomemo

Lodash's memoize function, but in a much smaller package than lodash.memoize's.

Read lodash's docs for more info.

Install

npm install --save lomemo

Usage

import lomemo from 'lomemo';

// Memoize a function, using the first argument as the key

const memoize = lomemo ( ( a, b ) => a + b );

memoize ( 1, 2 ); // => 3
memoize ( 1, 5 ); // => 3

// Memoize a function, using a custom function to generate the key

const resolver = ( ...args ) => args.join ( '' );
const memoize = lomemo ( ( a, b ) => a + b, resolver );

memoize ( 1, 2 ); // => 3
memoize ( 1, 5 ); // => 6
memoize ( '', '15' ); // => 6

License

MIT © lodash

Keywords

FAQs

Package last updated on 14 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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