https://github.com/zsh2401/tdscore
Data Structure & Algorithms implements with pure TypeScript for any JavaScript runtime.✨
https://github.com/zsh2401/tdscore
data-structures data-structures-and-algorithms javascript mathematics nodejs typescript
Last synced: 8 months ago
JSON representation
Data Structure & Algorithms implements with pure TypeScript for any JavaScript runtime.✨
- Host: GitHub
- URL: https://github.com/zsh2401/tdscore
- Owner: zsh2401
- License: other
- Created: 2021-03-03T02:34:53.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-17T06:18:14.000Z (over 3 years ago)
- Last Synced: 2024-04-25T10:22:04.626Z (over 1 year ago)
- Topics: data-structures, data-structures-and-algorithms, javascript, mathematics, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 1.52 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README-en-US.md
- License: LICENSE
Awesome Lists containing this project
README
# Warning: this library is stll developing, do not use this under production env.

# 😊 [TDSCore](http://ds.zsh2401.top)
English | [中文](./README.md)
```sh
npm i tdscore
```
Data Structure, Algorithms and Mathmatics code written by 100% TypeScript✨
[](https://github.com/zsh2401/tdscore/actions/workflows/test.yml)
[](https://github.com/zsh2401/tdscore/actions/workflows/publish.yml)

[](https://app.codecov.io/gh/zsh2401/tdscore)
[](https://david-dm.org/zsh2401/tdscore)
[](https://www.npmjs.com/package/tdscore)


# Features
* Readable: Designed for learning.🌌
* Run everywhere: using only ES5 syntaxes.
* Small: Minified and gzipped only 22.4KiB(v0.1.26)。
* Can be compiled to binary.see [tdscore-app-template](https://github.com/zsh2401/tdscore-app-template)
# Install
```sh
npm install tdscore --save
```
Browser
```html
```
# Usage🎉
```typescript
import { HashMap } from "tdscore"
let hashMap = new HashMap();
hashMap.mapPut("a",1);
console.log(hashMap.mapGet("a")); // 1
```
TDSCore can be also imported with following ways:
* Global Variable `window.tdscore`
* CommonJS `require("tdscore")`
BTW, you can try TDSCore without configuring anything with RunKit.
[RunKit for TDSCore](https://npm.runkit.com/tdscore)
# Document 🍕
[**View online document in official website**](http://ds.zsh2401.top)
# Join development🤝
You can [view code online with github1s](https://github1s.com/zsh2401/tdscore/)
## Clone & Checkout
```sh
git clone https://github.com/zsh2401/tdscore.git
cd tdscore
git fetch origin dev
git checkout dev
```
## Install dependencies
```sh
yarn
```
## Build & Test
```sh
# UMD Bundle file.
yarn build:dist
# ES6
yarn build:es
# ES5
yarn build:lib
# All above
yarn build
```
### Unit Test
```sh
yarn test
```
Notice:
* Please write your code at dev branch.
* Pull requests are always welcomed.
# Contributors
# License
TDSCore is licensed under [Mulan PSL v2](https://opensource.org/licenses/MulanPSL-2.0).