1.1.21 • Published 1 year ago

@devtea2027/sapiente-dolorem-quisquam-ab v1.1.21

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vitruvius

npm version Health Check

Vitruvius extends redux's combineReducers to allow developers to include a buildInitialState method on their reducer. This allows for the passing of locals to build the initial state that wouldn't normally be available to a reducer when setting its initial state. For instance, one could pass some data from the request object.

Want to get paid for your contributions to vitruvius? Send your resume to oneamex.careers@aexp.com

Installation

$ npm install --save @devtea2027/sapiente-dolorem-quisquam-ab

Implementation

Below is an example of a reducer implementing a buildInitialState method and an example of vitruvius being implemented.

import { Map } from 'immutable';

export const SOME_ACTION = 'SOME_ACTION';

const buildInitialState = ({ data } = {}) => new Map({ foo: data || 'bar' });

export default function reducer(state = buildInitialState(), action) {
  switch (action.type) {
    case SOME_ACTION:
      return state.set('foo', action.data);
    default:
      return state;
  }
}

reducer.buildInitialState = buildInitialState;

TIP: To extend combineReducers from redux-immutable instead of redux import from @devtea2027/sapiente-dolorem-quisquam-ab/immutable.

import vitruvius from '@devtea2027/sapiente-dolorem-quisquam-ab';

const reducer = vitruvius({
  stuff: stuffReducer,
  things: thingsReducer,
  ...otherReducers,
});

const store = createStore(reducer, reducer.buildInitialState(locals), enhancer);

Contributing

We welcome Your interest in the American Express Open Source Community on Github. Any Contributor to any Open Source Project managed by the American Express Open Source Community must accept and sign an Agreement indicating agreement to the terms below. Except for the rights granted in this Agreement to American Express and to recipients of software distributed by American Express, You reserve all right, title, and interest, if any, in and to Your Contributions. Please fill out the Agreement.

License

Any contributions made under this project will be governed by the Apache License 2.0.

Code of Conduct

This project adheres to the American Express Community Guidelines. By participating, you are expected to honor these guidelines.

libphonenumber.envtoStringTagienpmcheckkeysrestphonetoSortedYAMLinferenceObject.fromEntriesfpsspecsymlinks256AsyncIteratoryamldiffperformanceoptionenumerablethrottlepipefigletIteratorperformantopenerfsconsoleguidbootstrap cssintrinsicECMAScript 6rfc4122react-testing-libraryextratoolkitcompile lesscolumnses2017command-lineserializationArray.prototype.filtershellparsingasciimake dirreducervestutil.inspectwalkingflatMapjsonpathobjectchromiumstylesresolveoptimistshimECMAScript 7preprocessorfastcloneclass-validatorlinewrapUint8ClampedArrayaccessorargvFloat64Arrayaccessibilityreduceamazoninstallec2pnpm9directoryfindLastIndexjoiopenrangeerrorslicehasOwnPropertyhelperscensorHyBicurlrdsflatregularassertionclassnametypanionpackage managerECMAScript 2023languageargsbreakomitdynamodbhas-owndependenciespackagesES2023loadbalancingtermTypedArrayescapecss variableregexweakmapvisualsyntaxerrorlooklesscsshandlerstypedarraySymbol.toStringTaglastUnderscoresetcommanderpyyamlcomputed-typesmimetypesdebuggeres6indicatorwebObject.issetterPromiseio-tsutilitiesprunethroattyped arrayviewexpressvariablessyntaxtrimLeftremovefixed-widthiteratorspeedargumentarraystructuredCloneelasticacheinternali18nshamelbdeterministicfluxes-shim APIsignalES2015packagesimpledbgroupByfast-cloneschematoolssymbolss3flattenowncryptovalue@@toStringTagTypeScriptArray.prototype.findLastloggercomparefilejavascriptES3weaksettaptddapiregular expressioneslintconfigBigUint64Arraywebsitelaunchpatchrobustpolyfillrateless cssargparsepostcssreduxtelephonemaplazyflagsassignhigher-ordervalidexefast-copyconsumecolorformsavajwtmobileonceimportexportjeststarterStyleSheetequalclassessomees2018idbufferscoloures2015deleteidlefastreal-timemoduleECMAScript 2015bluebirdReflect.getPrototypeOfxtermfindmimereact-hooksnameexitECMAScript 2017$.extendjQuerydataviewworkflowObservableCSSStyleDeclarationprotofunctionsES2022gdprArrayBufferdescriptiongettercloudfrontreplaymomentexecchineseURLchaicompilerbusyslotUint16ArrayajaxencryptionES2021droptraversetostringtagworkspace:*callboundreadablestreamhasOwnStreamsminimaltestermonorepoxdgpredictableruntimematchprivate dataes-abstractwidthArray.prototype.flatglobalsESnextes-shimsES5functionenderpromiseautoscalingesES7batchvaluesprototypeform-validationtslibframeworkelmsetImmediateJSON-SchemaArrayBuffer#sliceshebanglimitedhttpchildES2018searchreusetypebindpicomatchjasminedescriptors_.extendmodulescollection.es6shrinkwrapECMAScript 2021ratelimitauthcharacterpushregular expressionsinternal slotFloat32ArrayconfigurableelectronObject.keyseslintpluginenvbrowserlistdebugObject.assignfastifynodejsmacosvarsextendStreamsharedenvironmentsmime-dbendpointstatelesstypesafehassuperstructcssqueryoutputefficientisConcatSpreadablematchesfilterlintstringifyirqInt32Arrayimmermixinsconcurrencyawesomesaucebundlerworkerdeep-copyoffsetforEachwindowshttpsmatchAllpropertiesbyteOffsetrmeveryprefixwritemulti-packageyupemrObservablessymlinkES6ECMAScript 2016ReactiveExtensionsparentwraptoArraycharacterses2016wordbreakpromisesES2016dataViewString.prototype.matchAlllockfileRegExp#flagscorstestingrm -rflimitsqsURLSearchParamsrgbfromtrimEndregexpsymbolawsawaitpasswordoptimizerstartbeanstalkcloudwatch0Function.prototype.nameconfiglessfindupJSONdotenvmocharestfulhardlinkswafpositivemrusameValueZeromapreducetypesrequestredactwritablespinnertc39parsertypeofrequirenegativestyleguidedeepcopysesbrowserextensiontapeless compilerdeepsharedarraybufferES8ArraysigtermparsejsdomObject.entriesproxyquerystringes7WebSocketsgroupschemeArray.prototype.findLastIndexbcryptECMAScript 2018linuxxdg-openserializecall-bindglobjsxformerroreditorswftoobjectstoragegatewaystyled-componentsindom-testing-librarya11ystyleutilsideprotobuflrusafeSymbolimportexecutablejshintprocessartECMAScript 2022zeroassertMicrosoftmetadatacallpersistentfoldercorestylingopenswordwrapxhrUint32Arrayfastcopyvalidationcontainscloudtrailnativejapanesecss nestingurlliveexpressioncacheiteratecircularwatchFilearktypehashstreamsmkdirpargumentsnodeupfull-widthspawncoerciblestatusArray.prototype.includesRFC-6455datewatchparentschannelscheme-validationestreewarningfunctionalerror-handlingmovepostcss-pluginredux-toolkitfindLastcloudformationcjkclassnamesformatmergeObject.valueshotgetPrototypeOfsnsReactiveXgetintrinsicprogresseslint-plugincallbackcodespathWeakMapsequencearraybufferasynccolorsECMAScript 5[[Prototype]]mkdirswatchingassertsauthenticationairbnbjsiamrm -frebsvariables in cssmkdiremojienvironmentsuperagentunicodecss lessInt8Arrayprettyautoprefixer-0ArrayBuffer.prototype.sliceprivatestringcall-bounddayjshookformdefinenested cssBigInt64Arraymakevpckinesissignalskarmakoreandeepclonecolumnpreserve-symlinksinvariantagentObject.definePropertybyteglobaltsexit-codeTypeBoxstringifiernumberRegExp.prototype.flagswaitstreamquotecryptrmdirnegative zeroajvtrimRightfile systemspinnersprotocol-bufferstrimStartUint8ArrayES2020ponyfilltypedarraysfseventsWebSocketconnectjsongradients css3ECMAScript 3arraysObjectkeyRxinputzodcallbindcommandwhatwgstableplugindatastructureimmutablelook-upsetPrototypeOflinktypeerrorlistenerspackage.jsoneventsArray.prototype.containsObject.getPrototypeOftty
1.1.21

1 year ago

1.1.20

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