super-aop
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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/

Readme

Keywords

none

Package Sidebar

Install

npm i super-aop

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

12.6 kB

Total Files

10

Last publish

Collaborators

  • sl1673495