3.4.79 โ€ข Published 11 months ago

@diotoborg/exercitationem-culpa v3.4.79

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months 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

11 months ago

3.4.78

11 months ago

3.3.78

11 months ago

2.3.78

11 months ago

2.3.77

11 months ago

2.3.76

11 months ago

2.3.75

11 months ago

2.3.74

11 months ago

2.3.73

11 months ago

2.3.72

11 months ago

2.3.71

11 months ago

2.3.70

11 months ago

2.3.69

11 months ago

2.3.68

11 months ago

2.3.67

11 months ago

2.2.67

11 months ago

2.1.67

11 months ago

2.1.66

11 months ago

2.1.65

11 months ago

1.1.65

11 months ago

1.1.64

11 months ago

1.1.63

11 months ago

1.1.62

11 months ago

1.1.61

11 months ago

1.1.60

11 months ago

1.1.59

11 months ago

1.1.58

12 months ago

1.1.57

12 months ago

1.1.56

12 months ago

1.1.55

12 months ago

1.1.54

12 months ago

1.1.53

12 months ago

1.1.52

12 months ago

1.1.51

12 months ago

1.1.50

12 months ago

1.1.49

12 months ago

1.1.48

12 months ago

1.1.47

12 months ago

1.1.46

12 months ago

1.1.45

12 months ago

1.1.44

12 months ago

1.1.43

12 months ago

1.1.42

12 months ago

1.1.41

12 months ago

1.1.40

12 months ago

1.1.39

12 months 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