1.0.1 • Published 6 years ago

super-aop v1.0.1

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

super-aop

TypeScript实现aop面向切面编程

Usage

npm i super-aop
import aop from 'super-aop'

let fn = () => {
  console.log('fn')
  return 1
}

fn = aop(fn, {
  before() {
    console.log('before')
  },
  after(fnReturn) {
    console.log('after')
    console.log(fnReturn)
  }
})

// before
// fn
// after
// 1

docs

https://sl1673495.github.io/super-aop/

1.0.1

6 years ago

1.0.0

6 years ago