Skip to content
Subhajit Sahu edited this page Feb 10, 2020 · 6 revisions

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' }
Clone this wiki locally