Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

econ

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

econ

Event Collections

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-78.57%
Maintainers
1
Weekly downloads
 
Created
Source

ECON

Build Status npm version Downloads DeepScan grade Chat on Gitter

Extension of TypeScript-STL Containers dispatching Events.

Features

Linear Containers

  • Vector
  • Deque
  • List
  • VectorBoolean

Associative Containers

  • Tree-structured Containers
    • TreeSet
    • TreeMultiSet
    • TreeMap
    • TreeMultiMap
  • Hash-buckets based Containers
    • HashSet
    • HashMultiSet
    • HashMap
    • HashMultiMap

Installation

NPM Module

Installing ECON in NodeJS is very easy. Just install with the npm.

# Install TSTL from the NPM module
npm install --save econ

Usage

import econ = require("econ");

function listener(event: econ.TreeMap.Event<number, string>): void
{
    console.log("Event type is: " + event.type);

    for (let it = event.first; !it.equals(event.last); it = it.next())
        console.log("\t", "An element by that event:", it.value);
}

function main(): void
{
    // CONSTRUCT EVENT TREE-MAP
    let map: econ.TreeMap<number, string> = new econ.TreeMap();
    map.addEventListener("insert", listener);
    map.addEventListener("erase", listener);

    // DISPATCHES INSERT EVENT
    map.set(1, "One");
    map.set(2, "Two");
    map.set(3, "Three");

    // DISPATCHES ERASE EVENT
    map.erase(2);
    map.erase(3);
}
main();

References

Keywords

FAQs

Package last updated on 09 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc