act-master

A way to separate business logic from application view.

Usage no npm install needed!

<script type="module">
  import actMaster from 'https://cdn.skypack.dev/act-master';
</script>

README

Act-Master

A way to separate business logic from application view.

The easiest library to create a flexible application architecture.

npm bundle size npm version

vue-act-master

๐Ÿ“— Documentation

๐Ÿ—บ Example project structure

๐Ÿงช Test writing with "ActTest"


Example

Installation

npm install act-master

Usage

import { ActMaster } from 'act-master';

const $act = new ActMaster();

const action = {
  name: 'LogData',
  exec(message) {
    console.log('Log:', message);
    return 'Success!!!';
  }
};

$act.addAction(action);

// Use action
const result = await $act.exec('LogData', 'Hello world');

console.log('Result:', result);

console.log

Log: Hello world
Result: Success!!!