安装

NPM version (opens new window)

# 🧲获取

NPM

npm i tdscore

CDN

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

直接下载

下载最新版本 (opens new window)

# ✍使用

ES Module

import { dsHashCode } from "tdscore"
dsHashCode(1); // 1

CommonJS

const dsHashCode = require("tdscore").dsHashCode;
dsHashCode(1); // 1

Tree Shaking

Webpack可以通过Tree Shaking技术将您的引入进行按需编译,大幅减小产出物的体积。

import dsHashCode from "tdscore/lib/dsHashCode"
dsHashCode(1); // 1

浏览器🌌

<script>
    tdscore.dsHashCode(1); //1
</script>