Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple map from strings to values in JavaScript

branch: master
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.