3.4.79 โ€ข Published 1 year ago

@diotoborg/exercitationem-culpa v3.4.79

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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-@diotoborg/exercitationem-culpa

Usage

// main.ts
// install vue-@diotoborg/exercitationem-culpa plugin
import Vue from 'vue';
import App from './App.vue';

import { VueActMaster } from 'vue-@diotoborg/exercitationem-culpa';

// 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-@diotoborg/exercitationem-culpa';

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>
offsetelmUint8Arrayconfigurabledragback-endcolorsespreeprototypefppropertyelasticachejsxrapidreducevarendpointES2021slicesubprocesspatherror-handlingdescriptorprotobufwritabletoolkitmatchimmerassertsboundclass-validatorhandlerstartertsvisualdataviewarraysinstallexitstringfastBigInt64ArraytrimRightECMAScript 2022libphonenumberregularjQueryutilsdeep-copybyteOffsetrgbcallboundansicurriedstylesparsesymlinkTypedArrayTypeScriptes-shim APIairbnbhashasOwnPropertyyupRegExp#flagsamazonregular expressionloadbalancingsomefluxArray.prototype.findLastnested csstyped arrayimportexportecmascriptlengthdombyteLengthletiterationbddsetPrototypeOfgitignoreclassnamesmockglacierwindowsworkercloudtrailes2015binarydependency managerMaptypesafeString.prototype.matchAllYAMLES7sameValueZeroglobal objectgdprObjecttestingfast-copyeventEmitterArray.prototype.flatcss-in-jsstreammapreducecensorcloudwatchhelperredirectperformanceArray.prototype.includesless.jsbundlingdotenvnpmtimewriteprivatewhatwgbuffersdescriptorsinstallernativeconcatMapisConcatSpreadableclassnameebssignalsnpmignorefastifycommand-lineObject.assigntrimStartArrayBuffer#slicedependenciespreserve-symlinkspropertiesmappoint-freenodejsbrowserlistfast-clonepostcssincludeses2018groupBytestertouchcss lesspluginglobalsinferenceshams3wafmoduleequalsettings6to5speedframerlistenersES2017schemaHyBiajaxrdsjavascriptequalityefficientrandomeffect-tsposeestreextermspringes2017deterministicglobalThiscertificateskoreanfiltergetOwnPropertyDescriptorFunction.prototype.namecloneprotoomitECMAScriptes-shimswindowintypeoftextmake dirArrayBufferECMAScript 7prefixchromiumredux-toolkitmockingaccessibilityECMAScript 2017mrumatchAllbcryptawesomesaucewhichtslib__proto__columnfpsURLSearchParamsArray.prototype.flatteneventsloggerES2015nopetermerrorsafeunicodemulti-packagequeueclassesexecutenumberFloat64Arrayprotocol-buffersastreadstateArray.prototype.flatMapreducereast-asian-widthglobapicomputed-typesbeanstalkrequireexpressionsymbolBigUint64Arrayspinnerscloudformationreact-hookshardlinksquerystringwaapiformatfixed-widthbabelinvariantrecursivegradients cssES2018css nestingsetassertenvargumentgraphql_.extendReflect.getPrototypeOfnegative zerolinktypedarrayserializationspecbannermomentArray.prototype.containsjseslint-pluginnegativecircularec2takemanagerminimalObject.fromEntriesUnderscoretacitlrucolorparservalidationforEach-0diffremoveWeakSetfunctionalauthenticationarrayassertionPromisecssautoscalingapolloSystem.global.envserializervalidatesharedutilpreprocessorStyleSheetpnpm9promisebusytddroute53intrinsicquoteprunethreefront-endwaittranspilercryptmobilecolourflatMaparraybufferautoprefixeremrStreamsassignvaluestransportECMAScript 3symbolshookformformattingmoveArray.prototype.filtermatchestrimEndtypedarraysfullwidthharmonytostringtagzodrangeerrorcommanderlintiteratorbinselfisbabel-corestringifierconsumepureextrajwttypanioninputhooksajvvariableses6ES5callbindserializeencryptionlogdefinePropertysigtermpushgetPrototypeOfshellswfgenericspostcss-pluginjshintcollection.es6ECMAScript 2021snsreadableES2016json-schema-validationInt32ArrayStreamdatepopmotionUint8ClampedArrayfindiamsesglobal this valueruleslessdescriptioncommandeslintfscall-bound$.extendSetperformantes8package managersymlinkspropECMAScript 2020valueroutingconstreact-componentformsuninstallPushArraydom-testing-libraryCSSStyleDeclarationvalidatorcryptoentriesrouteenvironmentlockfilemkdirsgradients css3joiprivate datatoArraychaisyntaxflatTypeBoxfullpipeobjhttpsscheme-validationqsless cssspawnasciilocalfindLastIndexweaksetreplayreactzxdefineString.prototype.trimtoolsinternalcall-bindtoSortedttydataViewes256validworkflowelbnamesproxyimportjsoniteratecopyRFC-6455reuseregexpES6curl0containsvpcfindLastwgetcreateterminalArray.prototype.findLastIndexawsgesturesObject.keysObservablesetImmediatehttphas-owncjksignedlivehigher-orderartservicespinnerObject.valuesCSSdayjsescapetelephonedeepreadablestreamkeyconsolefull-widthhelpers@@toStringTaghashkinesisreact animationramdaES2020typescriptchild.gitignoreserverinternal slotjestECMAScript 2023optimistworkspace:*flattenshimdeepcopyUint32ArrayregexESnextarktypejsdomprogressreal-timeless compilerUint16Arrayforkpolyfilltypedes-abstractuser-streamsgettypeObject.istoStringTagAsyncIteratorES2023ECMAScript 2015testbindacornoperating-systembrowserslistmacosmkdirpgetintrinsicsuperagentoptionshrinkwrapieless mixinselectronsharedarraybufferconcatform-validationpasswordexecObject.getPrototypeOfasyncmergexhrJSON-SchemabufferrequestwarningbrowsertypeerrorcollectionReactiveExtensionsflagcss variabledataInt16ArrayslotanimationformIteratora11yRxhasOwnreact posees2016streamsjson-schema-validatoreventDispatcherruntimebootstrap csskeysfast-deep-cloneauthpackagesstringifyredactECMAScript 2018fast-deep-copycorephoneutilitiesnodesettereslintconfigcallECMAScript 2016walkzeroECMAScript 6ECMAScript 2019outputsimpledbonceWebSocketjsonschemaaccessorimmutablestylingchromeopensslnamedynamodbwidthfastclonestatelesschannelutilitytypesexpressJSONsqsbyteenvironmentsfiledeep-clone3dsequencemixinsdatastructurepersistenturles5positivetoobjectlanguageownsortedutil.inspectReactiveXsuperstructjapanesel10nweakmapbinariesES2019core-jshandlersqueueMicrotasktraverseagentclicachegetterES8stylestablepicomatchbootstrap lessclientArrayBuffer.prototype.sliceinterruptsfile systemFloat32Arrayconfigreact-testing-libraryschemeObject.entriesmakefromfunctionsvariables in csscheckreduxdiroptimizercompile lessobjectsyntaxerrorviewES3Int8ArrayeverydeepclonestylesheetsignalgroupSymbol.toStringTaglesscssstyled-componentsyamllazyloadingcompilerenumerablecharactercloudsearcheslintpluginresolvemonorepocomparetrimLeftextendWeakMappackage.jsonenderdeletevarscodesgetoptargsexit-codefetchpatchURLdropchineseprocessmodulesstoragegateway
3.4.79

1 year ago

3.4.78

1 year ago

3.3.78

1 year ago

2.3.78

1 year ago

2.3.77

1 year ago

2.3.76

1 year ago

2.3.75

1 year ago

2.3.74

1 year ago

2.3.73

1 year ago

2.3.72

1 year ago

2.3.71

1 year ago

2.3.70

1 year ago

2.3.69

1 year ago

2.3.68

1 year ago

2.3.67

1 year ago

2.2.67

1 year ago

2.1.67

1 year ago

2.1.66

1 year ago

2.1.65

1 year ago

1.1.65

1 year ago

1.1.64

1 year ago

1.1.63

1 year ago

1.1.62

1 year ago

1.1.61

1 year ago

1.1.60

1 year ago

1.1.59

1 year ago

1.1.58

1 year ago

1.1.57

1 year ago

1.1.56

1 year ago

1.1.55

1 year ago

1.1.54

1 year ago

1.1.53

1 year ago

1.1.52

1 year ago

1.1.51

1 year ago

1.1.50

1 year ago

1.1.49

1 year ago

1.1.48

1 year ago

1.1.47

1 year ago

1.1.46

1 year ago

1.1.45

1 year ago

1.1.44

1 year ago

1.1.43

1 year ago

1.1.42

1 year ago

1.1.41

1 year ago

1.1.40

1 year ago

1.1.39

1 year ago

1.1.38

1 year ago

1.1.37

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago