Socket
Socket
Sign inDemoInstall

tstl

Package Overview
Dependencies
Maintainers
1
Versions
359
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tstl

TypeScript-STL (Standard Template Library, migrated from C++)


Version published
Weekly downloads
14K
increased by1.42%
Maintainers
1
Weekly downloads
 
Created
Source

TypeScript-STL

NPM

GitHub Repository: https://github.com/samchon/typescript-stl

Introduction

STL (Standard Template Library) Containers and Algorithms for TypeScript

TypeScript-STL is an open-source JavaScript library providing containers and algorithms migrated from C++ STL. You can enjoy STL containers and algorithms in JavaScript. If TypeScript, you will be much happier feeling like using originla STL with type restriction and template programming.

Abstract Containers

Containers
Global Functions

References

You can learn and explore about TypeScript-STL more deeply with such below:

Installation

Installing TypeScript-STL in node is very easy. Just install with npm and tsd.

Node
# Install TypeScript-STL from NPM modules
npm install --save typescript-stl 

# If you need header, then fetch from the @types
npm install --save @types/typescript-stl
TypeScript

Don't forget to referencing and importing the typescript-stl.

/// <reference types="typescript-stl" />

import std = require("typescript-stl");
let map: std.TreeMap<string, number> = new std.TreeMap<string, number>();

map.insert(std.make_pair("First", 1));
map.insert(["Second", 2]);
map.insert_or_assign("Third", 3); // C++17 Feature.
map.set("Fourth", 4); // Non-standard Feature.

for (let it = map.begin(); !it.equals(map.end()); it = it.next())
	console.log(it.first, it.second); // key => string, value => number
Browser

TypeScript-STL follows CommonJS module. You can't use require statement of RequireJS, which is following AMD module. Just include TypeScript-STL's js file with <script> tag.

In HTML Document
<script src="typescript-stl.js"></script>

Index of Guidance, Wiki.

Keywords

FAQs

Package last updated on 19 Dec 2016

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