n-typical
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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 每一次结束会触发的回调

Readme

Keywords

Package Sidebar

Install

npm i n-typical

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.14 kB

Total Files

6

Last publish

Collaborators

  • apine