rattail 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,13 @@
8
8
  <a href="https://rattail.pages.dev">Documentation</a> |
9
9
  <a href="https://github.com/varletjs/rattail/blob/main/README.zh-CN.md">中文介绍</a>
10
10
  </p>
11
+ <p>
12
+ <img src="https://img.shields.io/npm/v/rattail?style=flat-square" alt="version">
13
+ <img src="https://img.shields.io/github/stars/varletjs/rattail" alt="stars">
14
+ <img src="https://img.shields.io/npm/l/rattail.svg" alt="license">
15
+ <img src="https://img.shields.io/codecov/c/github/varletjs/rattail" alt="coverage">
16
+ <img src="https://github.com/varletjs/varlet/workflows/CI/badge.svg" alt="ci">
17
+ </p>
11
18
  </div>
12
19
 
13
20
  ---
@@ -17,6 +24,7 @@
17
24
  - 🛠️ &nbsp; Provide utilities frequently used in daily development
18
25
  - 🛠️ &nbsp; Utilities implementation is very lightweight
19
26
  - 🛠️ &nbsp; Written based on ts, providing complete ts types
27
+ - 💪 &nbsp; Make sure more than 90% unit test coverage, providing stability assurance
20
28
 
21
29
  ### Installation
22
30
 
package/README.zh-CN.md CHANGED
@@ -8,6 +8,13 @@
8
8
  <a href="https://rattail.pages.dev/zh">文档</a> |
9
9
  <a href="https://github.com/varletjs/rattail/blob/main/README.md">ENGLISH README</a>
10
10
  </p>
11
+ <p>
12
+ <img src="https://img.shields.io/npm/v/rattail?style=flat-square" alt="version">
13
+ <img src="https://img.shields.io/github/stars/varletjs/rattail" alt="stars">
14
+ <img src="https://img.shields.io/npm/l/rattail.svg" alt="license">
15
+ <img src="https://img.shields.io/codecov/c/github/varletjs/rattail" alt="coverage">
16
+ <img src="https://github.com/varletjs/varlet/workflows/CI/badge.svg" alt="ci">
17
+ </p>
11
18
  </div>
12
19
 
13
20
  ---
@@ -17,6 +24,7 @@
17
24
  - 🛠️ &nbsp; 提供日常开发中经常使用的实用工具
18
25
  - 🛠️ &nbsp; 工具实现非常轻量
19
26
  - 🛠️ &nbsp; 使用 ts 编写,提供完善的类型支持
27
+ - 💪 &nbsp; 确保 90% 以上单元测试覆盖率,提供稳定性保证
20
28
 
21
29
  ### 安装
22
30
 
package/lib/index.cjs CHANGED
@@ -437,7 +437,7 @@ function throttle(fn, delay = 200) {
437
437
  let timer;
438
438
  let start = 0;
439
439
  return function loop(...args) {
440
- const now = Date.now();
440
+ const now = performance.now();
441
441
  const elapsed = now - start;
442
442
  if (!start) {
443
443
  start = now;
package/lib/index.js CHANGED
@@ -338,7 +338,7 @@ function throttle(fn, delay = 200) {
338
338
  let timer;
339
339
  let start = 0;
340
340
  return function loop(...args) {
341
- const now = Date.now();
341
+ const now = performance.now();
342
342
  const elapsed = now - start;
343
343
  if (!start) {
344
344
  start = now;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rattail",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",