Giter Site home page Giter Site logo

cesarmarinhorj / tstl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samchon/tstl

0.0 1.0 0.0 18.3 MB

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

Home Page: https://tstl.dev

License: MIT License

TypeScript 99.54% C++ 0.46%

tstl's Introduction

TypeScript Standard Template Library

tstl

npm install --save tstl

GitHub license npm version Downloads Build Status FOSSA Status Chat on Gitter

Implementation of STL (Standard Template Library) in TypeScript.

  • Containers
  • Iterators
  • Algorithms
  • Functors

TSTL is an open-source project providing features of STL, migrated from C++ to TypeScript. You can enjoy the STL's own specific containers, algorithms and functors in the JavaScript. If TypeScript, you also can take advantage of type restrictions and generic programming with the TypeScript.

Below components are list of provided objects in the TSTL. If you want to know more about the TSTL, then please read the Guide Documents.

Features

Containers

Algorithms

Functors

Installation

NPM Module

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

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

Usage

import std from "tstl";

function main(): void
{
    const map: std.TreeMap<number, string> = new std.TreeMap();

    map.emplace(1, "First");
    map.emplace(4, "Fourth");
    map.emplace(5, "Fifth");
    map.set(9, "Nineth");

    for (const it of map)
        console.log(it.first, it.second);

    const it: std.TreeMap.Iterator<number, string> = map.lower_bound(3);
    console.log(`lower bound of 3 is: ${it.first}, ${it.second}`);
}
main();

Appendix

tstl's People

Contributors

samchon avatar lukaspukenis avatar meirionhughes avatar zakuroishikuro avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.