1.0.0 โ€ข Published 26 days ago

@omegion1npm/eos-officiis-non v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
26 days ago

Vue-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


๐Ÿ“— Documentation

๐Ÿงช Test writing with "ActTest"


Example

Installation

npm install vue-@omegion1npm/eos-officiis-non

Usage

// main.ts
// install vue-@omegion1npm/eos-officiis-non plugin
import Vue from 'vue';
import App from './App.vue';

import { VueActMaster } from 'vue-@omegion1npm/eos-officiis-non';

// Actions array
import { actions } from '../act/actions';

Vue.use(VueActMaster, {
  actions,
});

new Vue({
  el: '#app',
  render: (h) => h(App),
});
// ../act/actions
export const actions: ActMasterAction[] = [
  new GetDataAction(),
];
// action-get-data.ts
import { ActMasterAction } from 'vue-@omegion1npm/eos-officiis-non';

export class GetDataAction implements ActMasterAction {
  name = 'GetData';

  async exec() {
    const url = 'https://jsonplaceholder.typicode.com/todos/1';

    const response = await fetch(url);
    return response.json();
  }
}

The action is now available to you in components and you can easily highlight the business logic.

This will help you test components and change the API more easily.

// App.vue

<script>
export default {
  data() {
    return {
      myData: null,
    };
  },

  async mounted() {
    console.log(this.myData); // null

    this.myData = await this.$act.exec('GetData');

    console.log(this.myData);
    // {
    //   "userId": 1,
    //   "id": 1,
    //   "title": "delectus aut autem",
    //   "completed": false
    // }
  }
}
</script>
matchAllparentsutilitysigtermprogressmomentstarterUint8ArrayinferencemoveanimationsanitizeRxJSrandomtypeofdataviewquerystringfindLastIndexESnextlazygetOwnPropertyDescriptoroperating-systemfastcloneString.prototype.matchAll_.extendpreserve-symlinkstyped arrayunicodel10nfunctionspipegroupjasmineimmutablebytedrages2017everyconsolecharactercodescore-jsECMAScript 2020safewhichTypedArraybreakbyteLengthfast-deep-cloneES2017getoptprotobufsuperstructfast-cloneiterationdescriptorArrayquerydefinePropertyutilscss nestingpruneclimonorepoincludessignalsmacosStreamsmimetypestouchmapdom-testing-librarylockfileshebanglibphonenumberyuplintless compilerUint8ClampedArraySetapimatchmoduleswgetvarelectronpersistentexit-codevalidateconcatMapbundlerbundlingcircularasyncreal-timepropcurlttytermObjectlinewrapbabelflagshttptranspilerratelimitinspectjsonschemafixed-widthansitexthandlerslook-upoptimizerbindstyleguidecall-bindPromisefunctionalreadrangeerrorObservablethreeES2016cssairbnbspringtypedasciistyleform-validationprototypelanguagenpmapolloconfigurablezeroopenwrapmkdirMicrosoftrecursivea11yECMAScript 2022telephoneauth256assertiondirectorydomSymbol.toStringTagsetjsdomvalidatorstreamtaskcontainsObject.getPrototypeOfonceeslintjsECMAScript 2016variablesreusegenericstraversevisualvaluesgetintrinsicaststringavaWebSocketsdatastructurecode pointsstringifierregular expressioncorehttpsObject.definePropertyInt32Arrayiterateeast-asian-widthFloat64Arrayenvreact-hooksinputletshimWebSocket3dStyleSheetpackage managerlastcolumnrateCSSStyleDeclarationES2023autoprefixerObject.fromEntriestrimStartJSON-Schemapopmotionloggerwarningtacitclientprivate dataes2015es5requireprefixpasswordparentsymlinkartreact-testing-librarydropshamwhatwgconsttoolsjavascriptarraywatchregularfiltercorsinstallstablesigintkeyprivateaccessibilityRegExp#flagstimemake dirArray.prototype.includesprettygraphqlarraybufferio-tsflattenECMAScript 2017TypeScripttoolkitobjextendArrayBuffer#sliceECMAScript 6listenersFunction.prototype.namebuffercall-boundMapimportFloat32ArrayES2015mergesymlinksWeakMapidleredactmochaspeedcomputed-typesslotloadinges7Object.assignES2019superagentURLwaapifindLastawaittranspiledeepdeterministicES2022tddReactiveExtensionspropertieskarmatypescriptrmdirinstallerconcatfilejsdiffqueue@@toStringTagirqpreprocessorescensorchromeassigntoArraywaitrgbcallboundupforEachlinuxpackage.jsonECMAScript 7validationcallstatusECMAScript 2018hasOwngetterexitweaksetawesomesaucevariables in csscryptregexpmetadatajson-schema-validatormulti-packagefastcopypushfullwidthArray.prototype.flatrm -rfflatMapeslint-pluginCSSfolderutilitiesprotocol-bufferslimitjson-schemacss variableSymboldeepcopygdprdataViewzodscheme-validationless csswindowses2018formattingfetchconsumephonewatchFilesyntaxerrorrmString.prototype.trimdebugcompilerduplexcolorsreactwritableiscommandersetImmediatesidehash__proto__curriedArray.prototype.filterReactiveXsettingsmkdirpless mixins6to5figletobjectRxconcurrencyschemamatchespositiveStreamkoreancss lesscallbindRegExp.prototype.flagsmimetestchineseconfigECMAScript 3toobjectreact animationsearchdependenciesnopesharedarraybuffertypesafeYAMLbabel-coregesturesresolveisConcatSpreadabletypedarrayemojirm -frentries[[Prototype]]nodecopytesterES8command-lineuser-streamsserializebyteOffsetterminalnodejsoutputpostcss-pluginuuidwalkES3mime-dbestreeAsyncIteratorspinnerrobustpackageformhelperses6serializationcallbackes-shimsshrinkwrapreduxdirpicomatchECMAScript 2015ArrayBufferObservablesfull-widthjsxlogmakenamefunctionclass-validatorenvironmentdescriptionmoduleweakmaptypestostringtagescapeviewshellspecreact posecheckchannelglobdataeslintconfignegative zerodiffframeworkreadablestreamObject.keysperformancepnpm9negativevalidexpressconnectcryptoyamltestingformsprocessgradients css3xtermtc39japanesereadablethroatsignalsetPrototypeOfeventstrimLeftintrinsicECMAScript 2023ecmascriptrfc4122fseventsfast-deep-copycss-in-jsexpressionBigUint64ArrayxssenderIteratorutil.inspectdayjs-0takereact-hook-formformatreducerwidthdeepcloneObject.valuesoptimistrequestbrowserlistclassnametrimprototrimEndbusyjwtomitpluginredux-toolkit.envJSONcreatearktypestringifyES7bootstrap cssfast
1.0.0

26 days ago