version 1.0.0
module: HashMap(js-ext) version 0.0.1
size-min gzipped: 1.69 kb (incl. dependencies: kb)
dependencies: polyfill
maintanance: Marco Asbreuk

all modules


Used as an alternative for an object without prototype.

Getting Started

With nodejs:

Create your project using this package.json. After downloaded, run npm install and start writing your application:

var ITSA = require('itsa');

In the browser:

For browser-usage, ITSA has a predefined loaderfiles. Once included, a global ITSA object with default features is available. For customized loaderfiles, read: Customized build.

<script src="/itsabuild-min.js"></script>

The Basics

An HashMap is an very plain object without a prototype. Therefore it is a clean object: it lacks all Object.prototype methods and properties. This can be usefull when you want the object just being used as a quick reference-container. This module exports a function named: createMap, which is available on ITSA as ITSA.createHashMap.

Example creating empty HashMap

var reservedWords = ITSA.createHashMap(),
    check; = true;
reservedWords.arguments = true;
reservedWords.boolean = true;

check = 'arguments';
if (reservedWords[check]) {
    alert('You cannot use '+check+' --> it is a reserved word');

Example creating filled HashMap

var reservedWords = ITSA.createHashMap({
        new: true,
        arguments: true,
        boolean: true

check = 'arguments';
if (reservedWords[check]) {
    alert('You cannot use '+check+' --> it is a reserved word');
API Docs

Table of Contents