StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/weakmap-shim
Angelos Chatzimparmpas e069030893 fix the frontend 3 years ago
..
test fix the frontend 3 years ago
.jshintrc fix the frontend 3 years ago
.npmignore fix the frontend 3 years ago
.travis.yml fix the frontend 3 years ago
LICENCE fix the frontend 3 years ago
README.md fix the frontend 3 years ago
create-store.js fix the frontend 3 years ago
hidden-store.js fix the frontend 3 years ago
index.js fix the frontend 3 years ago
package.json fix the frontend 3 years ago

README.md

weakmap-shim

A minimal weakmap shim

Example

var weakMap = require("weakmap-shim")

var map = weakMap()
var key = {}

map.set(key, 'some value')
var v = map.get(key) // 'some value'

create-store Example

var createStore = require('weakmap-shim/create-store')

var store = createStore()
var key = {}

var value = store(key)

// `value` is weakly bound to `key`. `value` is a plain object
value.foo = 'bar'

var value2 = store(key)

var v = value2.foo; // 'bar'
var bool = value === value2; // true

Motivation

Benvie has an excellent weakmap module that's far more robust. However it contains quite a bit of loc.

  • weakmap : 7451 bytes
  • weakmap-shim : 2106 bytes
  • weakmap-shim/create-store : 1311 bytes

This module is only worthwhile if you want to add a weakmap to a small module (10 - 30 loc) and dont want to bloat it with a heavier weakmap

Installation

npm install weakmap-shim

Contributors

  • Raynos

MIT Licenced