proxy-toolkit
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

proxy-toolkit

Proxy toolkit.

npm i proxy-toolkit pnpm add proxy-toolkit yarn add proxy-toolkit

Examples

# node
    # view source example/node.ts

    import { add } from 'proxy-toolkit'
    
    console.log(add(1, 2))
# web
    # view source example/web.ts

    import { add } from 'proxy-toolkit'
    
    const main = document.querySelector('main')!
    
    main.innerHTML = `<h1>1 + 2 = ${add(1, 2)}</h1>`

API

# FluentCaptureHandler

    # callMethod(name, args, ops)

      # name

        string

      # args

        unknown []

      # ops

      callMethod(name, args, ops)  =>

        unknown

# FluentCapture

    readonly [ "get", string | symbol ] | readonly [ "apply", any [] ] [] & {

    # origin

      Error

    }
# GetterReturn

    {}

# FluentCaptureSymbol  =  ...
# FluentCapture(handler)
# Getter(cb, target)

    # cb(key)

      # key

        string

      cb(key)  =>

# target  =  {}

    any

Getter<T>(cb, target)  =>

# applyFluentCapture(capture, target)

    # capture
    # target

      any

    applyFluentCapture(capture, target)  =>

      any

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas

Readme

Keywords

none

Package Sidebar

Install

npm i proxy-toolkit

Weekly Downloads

40

Version

1.2.0

License

MIT

Unpacked Size

32.1 kB

Total Files

18

Last publish

Collaborators

  • stagas