Skip to content
A simple map from strings to values in JavaScript
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
README.md
strmap.js

README.md

A simple map from strings to values in JavaScript

This implementation avoids the pitfalls of directly using objects for this purpose.

Usage on Node.js (on browsers, you need an AMD-compatible script loader such as RequireJS):

> var strmap = require("./strmap");
> var map = new strmap.StrMap({ foo: 1, bar: 2});
> map.get("foo")
1
> map.set("foo", "abc")

Tests

Something went wrong with that request. Please try again.