menhera-utils

0.0.1 • Public • Published

Install

$ yarn add menhera menhera-utils

Example

import Mhr, { $core } from "menhera";
import { data, methods, lifeCycle } from "../src";
 
let a = {
  _hooks: {
    data
  },
  data: {
    foo: 1,
    bar: {
      lol: 2
    }
  }
};
Mhr.$use(a);
console.log("a", a);
 
let b = {
  _hooks: {
    methods
  },
  methods: {
    foo: () => {},
    bar: () => {}
  }
};
 
Mhr.$use(b);
console.log("b", b);
 
let c = {
  _hooks: {
    lifeCycle
  },
  start() {
    console.log("c", this);
  },
  lifeCycle: {
    run: ["start"]
  }
};
 
Mhr.$use(c);

Dependents (3)

Package Sidebar

Install

npm i menhera-utils

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

1.89 kB

Total Files

5

Last publish

Collaborators

  • vaiii