npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tdscore

v0.3.0

Published

Data Structure, algorithms, mathmatic codes and enhancement of ECMAScript written by TypeScript

Downloads

12

Readme

警告: 此库仍在开发中,请勿用于生产环境

😊 TDSCore

2021年中国大学生计算机设计大赛一等奖作品

中文 | English

npm i tdscore

TypeScript实现的数据结构,算法,数学程式✨

Test Publish dependencies Status

NPM version

介绍

TDSCore目前主要有两个设计用途:科研与应用。一方面,TDSCore中包含大量注释,并力求设计的易理解,以供所有人研习源码。另一方面,项目单元测试覆盖率超过80%,确保在常见与极端情况下的代码健壮性,可用性。

特点

  • 可读性高:开发的首要目标为研习🌌
  • IXA模块:JavaScript生态中的Linq
  • 到处运行:运行在任何ES6环境
  • 麻雀虽小:min+gzipped 30kB
  • 五脏俱全:数据结构与算法持续添加中
  • QJS支持:tdscore-app-template

已经实现

| 线性结构 | 非线性结构 | 算法 | 数学 | 迭代| | ---- | ---- | ---- | ---- | ---- | |DSArray | HashMap |hash(∀) |Trigonometric | Chain | | ArrayList | 图结构定义 | BFS | cos | append | | LinkedList |树结构定义|DFS | Martix(OOP) |contains | | BitSpan| AVL | BST | Martix(Classic) | filter| |Queue |BiTreeNode |bubbleSort | 无限精度(DSNumber) | defaultOrFirst| | GList |HashSet | quickSort | Linear transformation | filter | | Stack |SetGraph | shellSort | Complex | forEach| | CQueue | | radixSort | Hamming Code | indexOf| | | | insertionSort | Color | isEmpty | | | | selectionSort | fab | last | | | | heapSort | |reverse | | | | seqSearch | |selectMany | | | | binarySearch || size | | | | prim | |toList/Map/Set | | | | kruskal| | where | | | | | treeForEach | | min/max|

设计理念

  • 避免使用undefined
  • 尽可能使用异常而不是null
  • 函数式与面向对象API同步推进
  • 力求API高度抽象与推广
  • 系统自洽

安装

NPM🧡

npm install tdscore --save

浏览器🗺

<srcipt src="//cdn.jsdelivr.net/npm/tdscore/dist/tdscore.min.js"></script>

使用🎉

import { HashMap } from "tdscore"

let hashMap = new HashMap<string,number>();

hashMap.mapPut("a",1);
console.log(hashMap.mapGet("a")); // 1

TDSCore同时支持通过以下方式引入:

  • 浏览器全局变量 window.tdscore
  • CommonJS require("tdscore")

另外,在RunKit上在线试用,您不需要配置任何开发环境。

RunKit for TDSCore

文档 🍕

查看在线文档

加入开发🤝

热烈欢迎任何对数据结构感兴趣的朋友加入开发! 欢迎Pull Request!

克隆并且切换到dev分支

git clone https://github.com/zsh2401/tdscore.git
cd tdscore
git fetch origin dev
git checkout dev

安装依赖

yarn

构建与测试

# 打包为umd单文件模块,输出产物位于dist文件夹
yarn build:dist 

# 编译为es6代码,输出产物位于es文件夹
yarn build:es 

# 编译为ES5代码,输出产物位于lib文件夹
yarn build:lib 

# 同步执行上面全部任务
yarn build

单元测试

yarn test

注意:

  • 请在dev分支上进行开发

贡献者

所有代码贡献者头像会被展示在此:

协议

TDSCore以木兰宽松许可证第二版进行授权。