15.4.1 • Published 5 years ago

@the-/mixin-controller v15.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@the-/mixin-controller

npm Version

Mixins for the-controller

Installation

$ npm install @the-/mixin-controller --save

Usage

'use strict'

const { TheCtrl } = require('@the-/controller')
const { withAuthorized } = require('@the-/mixin-controller')

async function tryExample() {
  class MyCtrl extends withAuthorized(TheCtrl) {
    async doSomething() {
      await this._assertAuthorized() // Inherit from withAuthorized
      /* ... */
    }
  }

  const ctrl = new MyCtrl()
  await ctrl.doSomething()
}

tryExample().catch((err) => console.error(err))

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Links

15.4.1

5 years ago

15.4.0

5 years ago

15.2.3

5 years ago

15.2.2

5 years ago

15.2.0

5 years ago

15.1.4

5 years ago

15.1.3

5 years ago

15.1.2

5 years ago

2.1.5

5 years ago