All Projects → k1r0s → Kaop Ts

k1r0s / Kaop Ts

Licence: mit
Simple Yet Powerful Library of ES2016 Decorators with Strongly typed method Interceptors like BeforeMethod, AfterMethod, OnException, etc

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Kaop Ts

Reflection
Lightweight (3K) ES Module implementation of reflect-metadata
Stars: ✭ 136 (-42.13%)
Mutual labels:  metadata, decorators
React Ioc
Hierarchical Dependency Injection with new React 16 Context API
Stars: ✭ 133 (-43.4%)
Mutual labels:  decorators, inversion-of-control
graphql-ts
Graphql implementation in Typescript using decorator
Stars: ✭ 63 (-73.19%)
Mutual labels:  metadata, decorators
Ioc
🦄 lightweight (<1kb) inversion of control javascript library for dependency injection written in typescript
Stars: ✭ 171 (-27.23%)
Mutual labels:  decorators, inversion-of-control
Vuvuzela
Private messaging system that hides metadata
Stars: ✭ 2,423 (+931.06%)
Mutual labels:  metadata
Testdeck
Object oriented testing
Stars: ✭ 206 (-12.34%)
Mutual labels:  decorators
Forensic Tools
A collection of tools for forensic analysis
Stars: ✭ 204 (-13.19%)
Mutual labels:  metadata
Exiftool Vendored.js
Fast, cross-platform Node.js access to ExifTool
Stars: ✭ 200 (-14.89%)
Mutual labels:  metadata
Node Decorators
node-decorators
Stars: ✭ 230 (-2.13%)
Mutual labels:  decorators
Linqit
Extend python lists with .NET's LINQ syntax for clean and fast coding. Also known as PINQ.
Stars: ✭ 222 (-5.53%)
Mutual labels:  metadata
Frappejs
Node + Electron + Vue based metadata web framework (inspired by Frappe)
Stars: ✭ 214 (-8.94%)
Mutual labels:  metadata
Inversify Express Example
The official express + inversify+ inversify-express-utils examples
Stars: ✭ 210 (-10.64%)
Mutual labels:  inversion-of-control
Mobx Task
Makes async function state management in MobX fun.
Stars: ✭ 218 (-7.23%)
Mutual labels:  decorators
Shields
Concise, consistent, and legible badges in SVG and raster format
Stars: ✭ 15,716 (+6587.66%)
Mutual labels:  metadata
Plumier
A TypeScript backend framework focuses on development productivity, uses dedicated reflection library to help you create a robust, secure and fast API delightfully.
Stars: ✭ 223 (-5.11%)
Mutual labels:  decorators
Typedi
Simple yet powerful dependency injection tool for JavaScript and TypeScript.
Stars: ✭ 2,832 (+1105.11%)
Mutual labels:  inversion-of-control
Structured Filter
jQuery UI widget for structured queries like "Contacts where Firstname starts with A and Birthday before 1/1/2000 and State in (CA, NY, FL)"...
Stars: ✭ 213 (-9.36%)
Mutual labels:  metadata
Fulltext
Search across and get full text for OA & closed journals
Stars: ✭ 221 (-5.96%)
Mutual labels:  metadata
Memo Decorator
Decorator which applies memoization to a method of a class.
Stars: ✭ 213 (-9.36%)
Mutual labels:  decorators
Datauri
Generate Data-URI scheme via terminal or node.js
Stars: ✭ 212 (-9.79%)
Mutual labels:  metadata

kaop

semantic-release Greenkeeper badge Image travis version Coverage Status dependencies dev-dependencies downloads Known Vulnerabilities

Lightweight, solid, framework agnostic and easy to use library written in TypeScript to deal with Cross Cutting Concerns and improve modularity in your code.

Short Description (or what is an Advice)

This library provides a straightforward manner to implement Advices in your app. Advices are pieces of code that can be plugged in several places within OOP paradigm like 'beforeMethod', 'afterInstance'.. etc. Advices are used to change, extend, modify the behavior of methods and constructors non-invasively.

For in deep information about this technique check the resources.

Demo

https://jsbin.com/bogecojuvi/edit?js,console

Get started

npm install kaop-ts --save

Use a join point to plug it to any method/class:

import { afterMethod } from 'kaop-ts'

const double = afterMethod(meta => meta.result *= 2)

class DummyExample {

  @double
  static calculateSomething (num, num2) {
    return num * num2
  }
}

DummyExample.calculateSomething(3, 3) // 18
DummyExample.calculateSomething(5, 5) // 50

Whats new on 3.0

  • Advices no longer use this to access several utilities.
  • Metadata properties have been renamed. Here you can check the reference .
  • JoinPoints support multiple advices:
// join point decorators expect a list of advices
@beforeMethod(advice1, advice2, advice3)
// even you can provide an advice array using spread operator
@beforeMethod(...adviceList)
someMethod() {

}

Docs

Resources

Credits

Made using TypeScript Library Starter

Similar resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].