1.0.1 • Published 8 months ago

n-typical v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

n-typical

基于 typical

✨ 扩展功能

  • 🥪 完整的TS类型支持
  • 🥖 更直观的循环方式
  • 🍦 循环结束回调

demo-pic

📦 安装

npm i n-typical

🔨 使用

import { type } from 'n-typical'

type(element, ['text', 1000, 'text next'], 3, () => {
    // each cycle finish
})

📖 API

(
    target: HTMLElement | Element | null | undefined,
    actions: (string | number | (() => unknown))[],
    loop?: number,
    cb?: () => unknown
) => Promise<void>
参数描述
target所需要控制的元素
actions由字符串数字和方法所组成的数组
loop循换次数,如需无限循环可传 Infinity
cb每一次结束会触发的回调
1.0.1

8 months ago

1.0.0

8 months ago