saber-x

1.0.9 • Public • Published

序章

  • $: (selectors: string) => Element | null:接收选择器字符串,返回与选择器匹配的第一个DOM元素。

  • $$: (selectors: string) => NodeListOf<Element>:接收选择器字符串,返回与选择器匹配的全部DOM元素。

A

  • assert: (condition: boolean, errorMessage: string, enabled: boolean) => void:断言函数,用于验证条件是否满足,如果条件不满足则抛出错误。

B

C

  • copyToClipboard:(text: string) => Promise<boolean>:将文本复制到剪贴板。

D

  • debounce: (func: Function, delay: number) => Function:防抖函数,用于限制函数的执行频率。

E

F

G

H

I

  • isValidEmail: (email: string) => boolean:验证邮箱地址格式是否符合规范。

  • isValidPhone: (phone: string) => boolean:验证手机号码格式是否符合规范。

J

K

L

M

N

O

P

Q

R

S

T

  • throttle: (func: Function, delay: number) => Function:创建一个节流函数,确保在一定时间间隔内只调用一次指定的函数。

U

V

W

X

Y

Z

Readme

Keywords

Package Sidebar

Install

npm i saber-x

Weekly Downloads

1

Version

1.0.9

License

ISC

Unpacked Size

7.35 kB

Total Files

16

Last publish

Collaborators

  • liliang12138