New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

memoize-sync

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

memoize-sync - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

6

package.json
{
"name": "memoize-sync",
"version": "0.0.0",
"version": "0.0.1",
"description": "Return a memoized version of function.",

@@ -13,7 +13,7 @@ "main": "index.js",

"repository": {
"url": "git@github.com:azer\/memoize-sync.git",
"url": "git@github.com:azer/memoize-sync.git",
"type": "git"
},
"author": "Azer Ko\u00e7ulu <azer@kodfabrik.com>",
"author": "Azer Koçulu <azer@kodfabrik.com>",
"license": "BSD"
}

@@ -20,2 +20,3 @@ ## memoize-sync

var memoizedWork = memoize(myfunc)
memoizedWork(10)

@@ -37,2 +38,31 @@ // "doing some work"

![](https://dl.dropbox.com/s/9q2p5mrqnajys22/npmel.jpg?token_hash=AAHqttN9DiGl63ma8KRw-G0cdalaiMzrvrOPGnOfDslDjw)
#### Using Hasher
```js
var memoizedWork = memoize(work, hasher)
memoizedWork('hello', 'world')
// doing some work
memoizedWork('hello', 'world')
// => hello world
memoizedWork('hello', 'kitty')
// doing some work
// => hello kitty
memoizedWork('hello', 'kitty')
// => hello kitty
function hasher(first, last){
return first + ', ' + last
}
function work(first, last){
console.log('doing some work')
return first + ', ' + last
}
```
![](http://distilleryimage2.s3.amazonaws.com/3e14d1ae8e4711e2af7822000a1fb04e_6.jpg)
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