Mijin
From Mixin and Inject
An just simple function-library for injecting into methods
WARNING!!!
Based on Node but compatible with Deno and browser!
PLEASE USE FOR ADVANCED MIXINS REMIXIN, MIJIN WILL REWRITTEN LIKE REMIXIN
https://github.com/soundcloud/remixin/tree/master
You can use it, but it recomended to use with functions, not classes, and also if you inject into class method you cant get this
object
!!!
Examples
Node
import mijin from './mijin.js'
const a = () => {
console.log('Hello world 1')
}
const b = () => {
console.log('Hello world 2')
}
const c = mijin(a, b, "AFTER")
c()
Deno
import mijin from 'https://deno.land/x/mijin/mijin.js'
const a = () => {
console.log('Hello world 1')
}
const b = () => {
console.log('Hello world 2')
}
const c = mijin(a, b, "AFTER")
c()
Browser
const a = () => {
console.log('Hello world 1')
}
const b = () => {
console.log('Hello world 2')
}
const c = mijin(a, b, "AFTER")
c()
Build
npm run build
# Now check ./dist!