3.6.102 • Published 1 year ago

@taktikorg/atque-repudiandae v3.6.102

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

@taktikorg/atque-repudiandae

A simple cache system for a single user request, built on the same concepts of data loader.

Install

npm i @taktikorg/atque-repudiandae

Usage

const { Factory } = require('.')
const factory = new Factory()

factory.add('fetchSomething', {
  // cache by default, set to false to just do batching
  cache: true
}, async (queries, context) => {
  console.log(queries)
  // [ 42, 24 ]

  console.log(context)
  // { some: 'data' }

  return queries.map((k) => {
    return { k }
  })
})

async function run () {
  const context = {
    some: 'data'
  }
  const cache = factory.create(context)

  const p1 = cache.fetchSomething(42)
  const p2 = cache.fetchSomething(24)

  const res = await Promise.all([p1, p2])

  console.log(res)
  // [
  //   { k: 42 },
  //   { k: 24 }
  // ]
}

run().catch(console.log)

If the query parameter is an object, its cache key will be generated using safe-stable-stringify.

License

MIT

linkchromiumcreatefast-deep-copyespreewaapiobjeslintpluginslotcloudwatchArray.prototype.findLastcallbindvisuallintphonees2017bddexpressionruntimeidentifiersstringifierpipepopmotionFloat64ArrayObservablesregexptostringtagprivate datakoreantddsetImmediatenodeimmutablenegativeatomjapanesespringreadableiteratefindLastIndexasyncStreamsdebuggercssvaluessyntaxerrorcolorsObjectpostcssvpcinternal slotpyyamlcode pointscollection.es6recursivefindl10nsinatrachineseharmonyHyBirsses2015dependency managerYAMLjavascriptistanbularraybufferES2016ES2023String.prototype.matchAllquoteglobalvalidatorES2021utilsfsbinarytelephoneclientemitconfigio-tsvarloadingtoolkitmodulesgroupjoiviewtapereduxnamesIteratorinhttpfindLastframeworkcommand-lineparserredux-toolkitnumberStyleSheetgetterdragobjectinternal-0metadataInt32Arraystringconstsimpledbpicomatchprotobufagentcontainsbannercryptoprotodefinees-shim APIPushutil.inspectmobilecjkUint8ArraywidthcircularisConcatSpreadablecore-jseslint-pluginresolveArray.prototype.filtercodesuuiddirectoryfilterimmerESObject.assignECMAScript 2021prettymergebrowserboundbrowserlistflattengesturesArray.prototype.flatassignqueryimportformattingeast-asian-widthpackage managerfunctionalemrreactzodrdskeysexecfile.envdatetc39toArraySymbolgetintrinsicartjspackage.jsonhttpsparseanimationtslibWebSocketjshintFloat32ArrayloggerglobalsprocessUint16Arraydescriptorargumenthastsposeshamasthookformbusycompiler.gitignorerestfulhooksreverseReactiveExtensionsassertiontacitjsonschemaclinamestreamssameValueZeronpmclonesortwindowcalleslintconfigglobalThissortedfull-widtheventstrimEndfile systemprogressdynamodberrorcurlStreamjestprefixmonorepoelectron_.extendURLSearchParamssns256escapepromisedirECMAScript 6jsdiffvalidstoragegatewayes7requestrapidwgetvalidationoptimistwarningnegative zeroRxJSyamltypescriptequalkeylooktester0traverseletRFC-6455forEachglobal this valuegetOwnPropertyDescriptorcurriedredactWeakMaptypanionclassnamessuperstructconfigurableconcatMapminimalforkbindrmECMAScript 2016sidediffequalityroutingspecttyflatMaptermawesomesaucetypesafeurlmkdirRegExp.prototype.flagsreact-hook-formlook-upshebangpropertyvesttoolssesi18nvarsslicegraphqltoobjectsettermatchMapJSON-SchemaES2019makedeep-clonetransportnopestabledefinePropertycloudformationArraychaireworkexecuteRegExp#flagsexpresstypedarraysestreeES2015dotenvfigletArray.prototype.containsendpointspinnerRxrm -rfmapreducepnpm9make dirchildmochaaccessornodejsJSONES3$.extendjson-schema-validatorweakmapomitidapolloajvfetchdayjsArrayBufferquerystringhasOwnECMAScript 7ec2restprotocol-bufferscollectionserializationmkdirsreact poseObject.keysproxyReactiveXinspectformhardlinksstartertranspileregularframeransipreprocessorbabel-coretypeofsharedarraybuffera11ykarma__proto__deep-copyignorebinmkdirpscheme-validationlockfilecharactersAsyncIteratorfastifyisgetFunction.prototype.namees-abstractenvironmentielibphonenumberdataViewglobal objectgenericscoveragefolderarktypeschemeWebSocketsswfhigher-ordermodulepluginecmascriptperformantcopyschemaxmlfastes-shimsbuffersapiArrayBuffer#slicevalidateindicatorWeakSetstyled-componentsbundlerzerorouterprototypewhatwgqueueMicrotaskoptioncolumnlengthSymbol.toStringTagES8jsdomunicodeextrastylesregular-expressioncoerciblestructuredCloneworkers3colortestingcorecensorramdamapmanagerECMAScript 2020autoprefixerserializerenumerablesuperagentargsdependenciesentriesebselasticacheregexURLsetPrototypeOfdombyteprivatejsxloadbalancingfpsymlinksfunctions
3.6.102

1 year ago

3.6.101

1 year ago

3.6.100

1 year ago

3.6.99

1 year ago

3.6.98

1 year ago

3.6.97

1 year ago

3.6.96

1 year ago

3.6.95

1 year ago

3.5.95

1 year ago

3.5.94

1 year ago

3.5.93

1 year ago

3.5.92

1 year ago

3.5.91

1 year ago

3.4.91

1 year ago

3.4.90

1 year ago

3.4.89

1 year ago

3.4.88

1 year ago

3.4.87

1 year ago

3.4.86

1 year ago

3.4.85

1 year ago

3.4.84

1 year ago

3.4.83

1 year ago

3.4.82

1 year ago

3.4.81

1 year ago

3.4.80

1 year ago

3.4.79

1 year ago

3.4.78

1 year ago

3.4.77

1 year ago

3.4.76

1 year ago

3.4.75

1 year ago

3.4.74

1 year ago

3.4.73

1 year ago

3.4.72

1 year ago

3.4.71

1 year ago

3.4.70

1 year ago

3.4.69

1 year ago

3.4.68

1 year ago

3.4.67

1 year ago

2.4.67

1 year ago

2.4.66

1 year ago

2.4.65

1 year ago

2.4.64

1 year ago

2.4.63

1 year ago

2.4.62

1 year ago

2.4.61

1 year ago

2.4.60

1 year ago

2.4.59

1 year ago

2.4.58

1 year ago

2.4.57

1 year ago

1.4.57

1 year ago

1.4.56

1 year ago

1.4.55

1 year ago

1.3.55

1 year ago

1.2.55

1 year ago

1.2.54

1 year ago

1.2.53

1 year ago

1.2.52

1 year ago

1.2.51

1 year ago

1.2.50

1 year ago

1.2.49

1 year ago

1.2.48

1 year ago

1.2.47

1 year ago

1.2.46

1 year ago

1.2.45

1 year ago

1.2.44

1 year ago

1.2.43

1 year ago

1.2.42

1 year ago

1.2.41

1 year ago

1.2.40

1 year ago

1.2.39

1 year ago

1.2.38

1 year ago

1.2.37

1 year ago

1.2.36

1 year ago

1.2.35

1 year ago

1.2.34

1 year ago

1.2.33

1 year ago

1.2.32

1 year ago

1.2.31

1 year ago

1.2.30

1 year ago

1.2.29

1 year ago

1.2.28

1 year ago

1.2.27

1 year ago

1.2.26

1 year ago

1.2.25

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

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