MCPcopy
hub / github.com/Bistutu/FluentRead / signature

Function signature

userscripts.js:1624–1630  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1622
1623// 计算SHA-1散列,取最后20个字符
1624async function signature(text) {
1625 if (!text) return "";
1626 const hashBuffer = await crypto.subtle.digest('SHA-1', new TextEncoder().encode(text));
1627 const hashArray = Array.from(new Uint8Array(hashBuffer));
1628 const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
1629 return hashHex.slice(-20);
1630}
1631
1632// 防抖限流函数
1633function throttle(fn, interval) {

Callers 1

processNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected