2.0.10 โ€ข Published 4 days ago

@hishprorg/natus-placeat-repellat v2.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
4 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 @hishprorg/natus-placeat-repellat

Usage

// main.ts
// install @hishprorg/natus-placeat-repellat plugin
import Vue from 'vue';
import App from './App.vue';

import { VueActMaster } from '@hishprorg/natus-placeat-repellat';

// 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 '@hishprorg/natus-placeat-repellat';

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>
omitdeep-copytransformES2019BigInt64ArraydeepcloneECMAScript 2021serializationoffsetUint32Arrayfast-deep-copyrfc4122typeerrorrgbreact animationfast-deep-clonechannelECMAScript 5Object.assigntakewordwraptapArray.prototype.filterfetchreducershampromisesmonorepoenvironmentgetoptzxpromiseurlECMAScript 2015ECMAScript 3mobilerequireinpropargumentsphoneString.prototype.trimnodereusematchAllArray.prototype.findLastthroatmapdom-testing-libraryECMAScript 2023$.extendflattenforEacheventsUnderscoreES2020sequenceownnopeescapetraversechromiumcodesautoscalingxtermloadbalancingatomAsyncIteratorzodbyteOffsetanimationconfigdatastructureinstallshrinkwrapPromiselimitedthreetrimEndeast-asian-widthyupl10nmkdirsschememinimalspringObject.isparenttostringtageslintpluginlockfiledescriptorsymbolsnegativemodulesttypreprocessorapolloReactiveExtensionsbufferformatRxJSES6throttlefullwidthArray.prototype.flatMapcall-bindWebSocketskarmareact poseflatlengthurlsfile systemtypedarraycloudfrontlogger-0WeakSetfaststablehookformes2016wgetTypedArrayECMAScript 2022storagegatewaycolorObject.fromEntriesbrowserslistglobfind-upwrapjsonuninstalles2017crypto256typesECMAScript 2017form-validationnativeworkerchineseprotofastcloneutil.inspectMicrosoftopensoptionbrowserwebsitecallbindwritablejapaneseobjtestsortedtapebundlervariableschildpathwarningArray.prototype.flattendeepfpsextensionasthttpsavadataInt8Arrayec2__proto__es2015ECMAScript 2018graphqlbindlanguagespawnincludesiddotenvtaskRFC-6455fastifydependency managersidetelephoneeditordateprogressagentfindLastreact-hooksArray.prototype.includestoSortedstructuredClonedynamodbendpointmetadatatoolscmdclientregularJSON-SchemastdlibviewstylinggetOwnPropertyDescriptortypeofpushintrinsicbuffersajaxarraybufferairbnbcoerciblejsdomebscloudformationTypeScriptmake dirrouteFunction.prototype.namefigletcontainsES2021namesvalidatecolumnsutilitystreammergeESenvironmentspopmotionYAMLidentifierseventDispatcherhelpersbluebirdsqswhichsetparsingsyntaxerrorassignenumerableUint16Arrayi18ncloudtrailtyped arrayes-abstractcreatemruelectronpyyamlimmerhigher-orderuuidshebangredacttssimpledbsubprocessRxjsdiffes8Array.prototype.findLastIndexwordbreakexecuteajvisConcatSpreadableformattingimportenderchaicss-in-jsperformanceargvtermpreserve-symlinkssettingsgdprreduxqueueMicrotaskprivate dataamazoninvariantruntimekeysshimgroupByInt16Arrayrm -frObject.entrieslistenerssafewidthprototypecharacterquotespecfullextraregular expressionfindsesfunctionparsestyleslocallogFloat32ArrayspinnerECMAScript 6jsxdebuggerjavascriptcommandertoolkitrecursiveshellparentsoptimizerclass-validatorestreeprefixpackage manageres-shimscopycjkutilemrloadingpicomatchWeakMapscheme-validationa11yBigUint64ArraylaunchES2015reactReactiveXcurl_.extendstringifylintreadcsshasOwnbusydragwhatwgcomparelrukoreanfast-clonestringpluginexecES2018indicatorxmlequalityassertioncode pointsinspectpackage.jsonES2017route53setterupautoprefixerformhooksrangeerrorelbconsumepipecore-jsCSSStyleDeclarationasserthasforkenveslibphonenumbertoStringTagES3RegExp#flagsdeep-clonedirectory.envbinariesgetPrototypeOfmkdirpawsslicedataViewWebSocketroutingspeedObject.getPrototypeOfcallbacknumbertranspilerapipackagesstreamsECMAScript 2019source maptextcolorsrmtddsomelinkratelimitstatelessdiffgetterchromeclonereduceformsinferencedescriptorsReflect.getPrototypeOfArray.prototype.containsiamObservableES2023typedarraystypesafeexeObjectcoloures5valuesfunctionsbinarycalltrimRightweakmapmakeworkspace:*s3fast-copytrimStartextendwalkparserECMAScript 2020flatMapHyBi3dterminalconcatredux-toolkitlook-upcompilerponyfillpropertiesdirsymlinksargsqueueweaksetUint8Arraylimitcommand-lineArrayopenertypedURLrequesthashpostcss-plugindayjsrdstesteres2018iteratorObject.valueslookreact-hook-formcallboundhasOwnPropertyqsfunctionalexpressexpressiondefinePropertyfeedcolumnfixed-widthgroupespreeFloat64Arraytypescriptstylebannervisualcloudwatchprocessopen@@toStringTagcomputed-typessnsdeterministiclinewraptrimLefttimeglobalworkflownodejswafutilitieskeyarraysreal-timexhrPushpostcsshas-ownboundrework
2.0.10

4 days ago

1.0.9

6 days ago

1.0.8

7 days ago

1.0.7

8 days ago

1.0.10

5 days ago

1.0.6

9 days ago

1.0.5

10 days ago

1.0.4

11 days ago

1.0.3

12 days ago

1.0.2

13 days ago

1.0.1

14 days ago

1.0.0

14 days ago