delete - nodef/extra-bimap GitHub Wiki

Removes the specified element from map.

BiMap.prototype.delete(key);
// key: key of the element to remove
// --> <boolean> true if element was removed
const BiMap = require('extra-bimap');

var m = new BiMap();
// BiMap [Map] {}

m.set(1, 'a');
// BiMap [Map] { 1 => 'a' }

m.set(2, 'b');
// BiMap [Map] { 1 => 'a', 2 => 'b' }

m.delete(1);
// BiMap [Map] { 2 => 'b' }
⚠️ **GitHub.com Fallback** ⚠️