4.8.100 • Published 10 months ago

@diotoborg/iste-laborum v4.8.100

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months 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 @diotoborg/iste-laborum

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 @diotoborg/iste-laborum/immutable.

import vitruvius from '@diotoborg/iste-laborum';

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.

extraidleeventDispatchermkdirplanguageapollobrowserlistenvglobalsenvironmentroute53utilitytextpyyamlRxJScssdynamodbpicomatchtoStringTagbufferseventEmitteremitefficientelectronjavascriptprettycopyes2016workflowESnextsymbolsreduceclass-validatorcloudsearchremoveinstalleroffsetprotobufreadablestreamsomedeepcopyfindlesshasOwnPropertyes2017Promisestyled-componentspropertylinuxWeakMapcall-bindhandlersback-endrequestObject.keysbyteOffsetjeststylingtoArrayendpointenvironmentsansibundlingmetadatacompilertyped arrayprototyperedux-toolkitmatchesconsumeswfpersistentuninstallspring3dless compilerbuffercryptkoreandom-testing-libraryiteratexhrObject.valuesharmonyloggingconstbrowserutilArray.prototype.flatMappredictablegrouppushsnsfsairbnbxtermttyjson-schema-validatorflatstylenpmnamewindoweslintconfigarraybufferloggertypedarrayssyntaxRxstarternumberjapaneseobjinstallpasswordcolorsgeterrorjwtposereducerregular-expressionexpressmakedeepdefinezodtelephoneexecutefile systemdescriptionprivate dataes2015rdssigtermconfigurablebabelhttptrimLeftwriteArray.prototype.flattentransportless.jsfantasy-landhotcss lessoptimistfunctionswritableproxymapreduceiamamazonpinoforksignalrgbECMAScript 6pruneinterruptsInt8ArraydomRFC-6455fast-deep-clonecolorcertificatesgetintrinsicchromiumnativelockfiledirectorycircularfunctionalWeakSetformsignorebytebinarieskinesisless mixinsInt32ArraySetArray.prototype.containsemrTypeScriptpackage.jsonroutingespreeES8mixinspreserve-symlinkssharedarraybufferes5framerObject.fromEntriesprotohooksbootstrap lessdeep-cloneintrinsicincludesgroupBymatchAlles-shimshelpersspecjson-schema@@toStringTaghasOwnchannelagentFloat64ArraydirECMAScript 3fnmatchspinnersimpledbprotocol-buffersflatMapMicrosoft.envSystem.globalpackage managermockchaifull-widthUnderscorefront-endpostcss-pluginBigInt64ArraywgetjshinttoolkitURLSearchParamstrimflattenassertionequalvariablessymbolspeedRegExp.prototype.flagsJSON-SchemaRegExp#flagsdeep-copyrandomMapassigntestingassertsnested cssdotenvbundlerUint8ClampedArrayescapeliveObjectwafterminalequalityfullwidthjoimockingpromisevalidationimmerinspectdiffvalidatorArray.prototype.includeslengthinternalECMAScript 2022tacitbindformattingECMAScript 2023react poseinputbeanstalkaccessibilityconfigexitidentifiersstyleguidees8compile lesssignedchinesetddoptimizerES2023helpereffect-tsURLwidthqueryunicodemobileletauthnpmignoreresolvejsonschemacallboundinvarianttrimEndfullstableprocessdependenciesawsmkdirjsdomoutputjsdiffarktypebootstrap cssloadingvisualpackagessetImmediatea11yimportexportschemaCSSstringpatchtranspilertypeofspawnparsergdprthreelrustringifyutilssharedArray.prototype.flatregexESjsonoperating-systemhigher-orderglobalThisses.gitignorepostcsspluginsetter[[Prototype]]function.lengthtypeUint32Arraydragslotreact-testing-librarymanagergesturescloudformationarraylocationObject.assignsymlinksObservablestestgraphqlcallbindchildbrowserslistperformanceUint16ArrayclassesreadvalueartES2020omitstylesheetSymbol.toStringTagreact animationtypedcss nestingspinnerstslibweaksetacornArray.prototype.findLastcodesfastcopyObject.entriesslicefindLastPushwaiteslintpluginreuseObject.isworkspace:*Arraygradients css3handlerflagses-abstractECMAScript 5structuredCloneisConcatSpreadablemergeelbrequiremruES2022mapchromees6point-freefixed-widthUint8Arraysortcorelesscsstouchsymlinkrulescomputed-typesreplaycreatehasES2018argvnegativeless csslibphonenumberminimalclassnamescheme-validationStyleSheetfastautoprefixerdropasciibabel-coreglobvalidredactbinarynodejsquotetoolsIteratorArrayBuffersignalssqsstreamscolumncoerciblecharactermonoreporeadableES3getPrototypeOfiterationcachefetchECMAScript 2021superstructfileregular expressionnopephoneES6s3ArrayBuffer.prototype.slicepathoncedataconcatMapdeterministicgetoptargumentshamwindowstypescriptfromruntimetesterfpshebangcolumnsprefixcolourqsgradients cssserverextendserializeryupurlownlinterror-handlingestreeStreamsAsyncIteratortostringtagwaapiclientvariables in cssgitignoretypeerrortc39utilitiesObservablevarsramdaconcatqueueMicrotaskargstsECMAScript 2019ast
4.8.100

10 months ago

4.8.99

10 months ago

4.8.98

10 months ago

4.8.97

10 months ago

4.8.96

10 months ago

4.7.96

10 months ago

4.7.95

10 months ago

4.7.94

10 months ago

4.7.93

10 months ago

4.7.92

10 months ago

4.7.91

10 months ago

4.7.90

10 months ago

4.7.89

10 months ago

4.7.88

10 months ago

4.7.87

10 months ago

4.7.86

10 months ago

4.7.85

10 months ago

4.7.84

10 months ago

4.7.83

10 months ago

4.7.82

10 months ago

4.7.81

10 months ago

4.7.80

11 months ago

4.7.79

11 months ago

4.7.78

11 months ago

4.7.77

11 months ago

4.7.76

11 months ago

4.7.75

11 months ago

4.7.74

11 months ago

4.7.73

11 months ago

4.7.72

11 months ago

4.7.71

11 months ago

4.6.71

11 months ago

4.5.71

11 months ago

4.5.70

11 months ago

4.5.69

11 months ago

4.5.68

11 months ago

4.5.67

11 months ago

4.5.66

11 months ago

4.5.65

11 months ago

4.5.64

11 months ago

4.5.63

11 months ago

4.4.63

11 months ago

4.4.62

11 months ago

3.4.62

11 months ago

3.4.61

11 months ago

3.4.60

11 months ago

3.4.59

11 months ago

3.4.58

11 months ago

3.4.57

11 months ago

3.4.56

11 months ago

3.4.55

11 months ago

3.4.54

12 months ago

3.4.53

12 months ago

3.3.53

12 months ago

3.3.52

12 months ago

3.3.51

12 months ago

3.3.50

12 months ago

3.3.49

12 months ago

3.3.48

12 months ago

3.3.47

12 months ago

3.3.46

12 months ago

3.3.45

12 months ago

3.3.44

12 months ago

3.2.44

12 months ago

3.2.43

12 months ago

3.2.42

12 months ago

3.2.41

12 months ago

3.2.40

12 months ago

3.2.39

12 months ago

3.2.38

12 months ago

3.2.37

12 months ago

3.2.36

1 year ago

3.2.35

1 year ago

3.2.34

1 year ago

3.2.33

1 year ago

3.2.32

1 year ago

3.2.31

1 year ago

3.2.30

1 year ago

3.2.29

1 year ago

3.2.28

1 year ago

3.2.27

1 year ago

3.2.26

1 year ago

3.2.25

1 year ago

3.2.24

1 year ago

3.2.23

1 year ago

3.2.22

1 year ago

3.2.21

1 year ago

3.2.20

1 year ago

3.2.19

1 year ago

3.2.18

1 year ago

3.2.17

1 year ago

3.2.16

1 year ago

3.2.15

1 year ago

3.2.14

1 year ago

3.2.13

1 year ago

3.2.12

1 year ago

3.2.11

1 year ago

3.2.10

1 year ago

3.2.9

1 year ago

3.2.8

1 year ago

3.2.7

1 year ago

3.2.6

1 year ago

3.2.5

1 year ago

3.2.4

1 year ago

2.2.4

1 year ago

2.2.3

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago