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

bursary

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bursary - npm Package Compare versions

Comparing version 1.0.0 to 3.0.0

26

index.js
'use strict';
module.exports = (initialForKey) => {
const o = {};
module.exports = (definition) => {
const keys = definition ? Object.keys(definition) : [];
for (const key of Object.keys(initialForKey)) {
const initial = initialForKey[key];
const map = new WeakMap();
o[key] = (subkey) => {
if (!map.get(subkey)) map.set(subkey, initial());
return map.get(subkey);
};
}
const initialize = () => keys.reduce((o, key) => {
const a = definition[key];
o[key] = typeof a === 'function' ? a() : a;
return o;
}, {});
const map = new WeakMap();
return o;
return (o) => {
const state = map.get(o);
if (state) return state;
const created = initialize();
map.set(o, created);
return created;
};
};
{
"name": "bursary",
"version": "1.0.0",
"version": "3.0.0",
"description": "Store private data.",

@@ -5,0 +5,0 @@ "main": "index.js",

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