UNPKG

strong-map

Version:

[![License](https://img.shields.io/npm/l/strong-map.svg)](https://img.shields.io/npm/l/strong-map.svg) [![Build Status](https://travis-ci.org/jorma16/strong-map.svg?branch=master)](https://travis-ci.org/jorma16/strong-map) [![Coverage Status](https://cove

24 lines (19 loc) 495 B
const StrongMap = require('../lib'); // With Vanilla Map const map = new Map([ ['Javascript', 'Good'], [{ lang: 'PHP' }, 'Bad'] ]); let js = map.get('Javascript'); let php = map.get({ lang: 'PHP' }); console.log(js); // Good console.log(php); // undefined // With StrongMap const strongMap = new StrongMap([ ['Javascript', 'Good'], [{ lang: 'PHP' }, 'Bad'] ]); js = strongMap.get('Javascript'); php = strongMap.get({ lang: 'PHP' }); console.log(js); // Good console.log(php); // Bad