1.1.1 • Published 6 years ago

@gitivon/decorators v1.1.1

Weekly downloads
12
License
MIT
Repository
-
Last release
6 years ago

提供多种修饰器

  • middleware
  • once
  • sleep
  • time

middleware

将方法修饰器进行简化,改造成类似 koa 中间件的形式,避免直接对 PropertyDescriptor 进行操作

once

对方法运行结果进行缓存,可以实现类似单例的操作
todo: 增加入参的识别

sleep

你懂得,先sleep再执行

time

类似core-decoratorstime,用来计算方法的执行时间,区别是还可以用在异步函数上

install

npm i @gitivon/decorators -D

registory

Github

License

MIT

Copyright (c) 2018 Ivon Hua

1.1.1

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago