1.2.14 • Published 1 year ago

@dramaorg/odit-accusantium v1.2.14

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

Build Status npm version

fxts-icon FxTS

FxTS is a functional library for TypeScript/JavaScript programmers.

Why FxTS?

  • Lazy evaluation
  • Handling concurrent requests
  • Type inference
  • Follow iteration protocols Iterable / AsyncIterable

Installation

npm install @dramaorg/odit-accusantium

Documentation

Please review the API documentation

Usage

import { each, filter, fx, map, pipe, range, take } from "@dramaorg/odit-accusantium";

pipe(
  range(10),
  map((a) => a + 10),
  filter((a) => a % 2 === 0),
  take(2),
  each((a) => console.log(a)),
);

// chaining
fx(range(10))
  .map((a) => a + 10)
  .filter((a) => a % 2 === 0)
  .take(2)
  .each((a) => console.log(a));

Usage(concurrent)

import { concurrent, countBy, flat, fx, map, pipe, toAsync } from "@dramaorg/odit-accusantium";

// maybe 1 seconds api
const fetchWiki = (page: string) =>
  fetch(`https://en.wikipedia.org/w/api.php?action=parse&page=${page}`);

const countWords = async (concurrency: number) =>
  pipe(
    ["html", "css", "javascript", "typescript"],
    toAsync,
    map(fetchWiki),
    map((res) => res.text()),
    map((words) => words.split(" ")),
    flat,
    concurrent(concurrency),
    countBy((word) => word),
  );

await countWords(); // 4 seconds
await countWords(2); // 2 seconds

you can start here

Build

  • npm run build

Running Test

  • npm test

Running Type Test

  • npm run compile:check

License

Apache License 2.0

rm -frjapaneseglaciertestSystem.globalAsyncIteratorObservablesspringcallboundfindgitignoreruntimeimmerimmutableObject.definePropertywarningbrowsergetterroute53propertiesRxArray.prototype.flatdescriptorshrinkwrapprototypemapreducedom-testing-libraryArraysafees7processviewcensorargumentjson-schema-validatoridledataview6to5zodbounddeleteuser-streamsfunctionECMAScript 2017threegetintrinsicflagargsnamestestingES3helpersmakesharedarraybufferECMAScript 2023ES2015dotenvsyntaxvisualentriestacitmomentsyntaxerrorkarmastyleguidechannelhookformelbbrowserslistescapeObject.valuesvarfastifydeepclonephoneStreamsloadbalancingartprogressupWeakSetmatchAllworkerpackagescheckreducerBigUint64Arrayyamlpackage.jsontoobjectpackage managerutilitypopmotionhardlinkscolumnhasOwnPropertyscheme-validationwritableArray.prototype.filtertypeofrmdirES2017Function.prototype.namemulti-packageECMAScript 5mochaassertsdependenciesfast-copynodemanagerpromisegdprdefinePropertyfpgroupByES7cloudwatchglobalThisECMAScript 2019BigInt64ArrayTypedArrayfast-deep-cloneparenttimechromestarter[[Prototype]]simpledbdifffindupdeepclientvalidation0regexeast-asian-widthdependency managerjasminetddprettyutilpruneECMAScript 2016Object.fromEntriesfunctionalgetoptasciiforEachtc39Array.prototype.findLastIndexawesomesauceguidatomtypanionjQuerycreateparseoptimizernegativeFloat32ArrayfullstylesaccessorindicatoroutputURLspinnersdeep-clonereusesearchWebSocketimportajvdropfastcopyignorestreamproptappuretoArrayrmchineseworkspace:*callbacktelephonetrimStartjsonschemaenvironmentacornReactiveExtensionspositiveHyBiwafconcatMapcolumnsECMAScript 2015readablestreamES2020objectlettypedarrayhasOwnmkdirsnpmintrinsicfindLastIndexframeworkuninstalltakesnscall-bindparentsflatMapurlextendl10nwalktransformArrayBuffer#slicerm -rfqueryebsrestfulextratypesjson-schema-validationnegative zerohelperstoragegatewayvalidatorpluginsideform-validationwidthtrimEndtsdragES2023bufferemititerateregular-expressionmovepostcssregexpcloudfrontvalidURLSearchParamsbundlerajaxwriteproxyerrorcoreformattingtextendernpmignoremergejsdomcachemkdirpregular expressionastidinspecttrimRightstructuredCloneformsdynamodbcollection.es6schemees-shim APIECMAScript 2020fastfetchs3eventDispatchertypescriptmapfile systemArray.prototype.containsiewaapiInt32ArraycurriedapiharmonypushmoduleexecassignwindowUint8ArrayMicrosoftcodessymbolses2018requirelinklookiteratorregularshimconcattslibapollopinopatchmodulesarraybufferyupexecfilecolourairbnbreadablehasmobiletoReversedconfigurablecircularstringifygetrgbecmascriptsuperstructtoSortedhashappsource mapArrayBufferquoteglobal objectglobenvautoscalingcommand-lineECMAScript 7ESnextincludestouchspawnwgetoptimisttermcloudformationcompareseta11yfunction.length_.extendRFC-6455copyarrayflatxmlreact-testing-libraryrouterlibphonenumberframer.gitignorextermbuffersUint8ClampedArrayeffect-tsutil.inspectjscore-jsreversedTypeBoxArrayBuffer.prototype.sliceeventEmitterRxJSECMAScript 6es2016weakmapclassnamesreactmanipulationWebSocketspoint-freeclassesroutingjsxObject.isdeep-copyInt16Arraycss-in-jsutilitiesES2018computed-typestoStringTagequalitytranspilesettermrues6slotinferencematchchromiumfiglettraverserangeerrorUnderscore256accessibilityprotocol-buffersvalueredirectloadingshebangunicodedirec2Objectdompyyamlrecursivecharacterjsonfast-deep-copyPushloggingtoolstypedidentifierspathReactiveXposecryptopicomatchprivate dataUint32ArrayArray.prototype.includessymbolexecutereducestyled-componentshttpponyfillasteriskselectronsharedes8packagejestgetOwnPropertyDescriptorispreprocessoreslintconfigasynceslint-pluginrequestkeysStyleSheetmake direslintfileES2019RegExp.prototype.flagsCSSamazonreverseECMAScript 2022objdirectoryfnmatchstringifierES2016higher-ordershellelasticachespeedworkflowflagsreadreact-hook-forminternalestranspileremojies5ECMAScript 3childsetPrototypeOfagentrobust__proto__symlinksendpointcharactersES6avasuperagentgenericsshamserializationterminalbyteestreewhichcssPromisearktypeinstallerECMAScripttypejavascriptcompilerString.prototype.trimclassnameSymbol.toStringTaglastfindLastvalidatespecIteratorinternal slotlogassertresolvedebuggerio-tsgesturesStreamstylingformonceperformantObject.assignsqsflattenlintpostcss-pluginqslocaljson-schema3dbrowserlistglobalredux-toolkitbindlocationfpsReflect.getPrototypeOfnametesterswfpolyfillweaksetfull-widthcoveragebabelbeanstalkuuidmonoreporulesequalstringArray.prototype.findLastpropertybundlingconfigbyteLengthtypeerrorrapidemres2015real-timeenumerablewebgroupdatestreamsformatbinaryselfglobal this valuettynodejsargvECMAScript 2021eventscollectioncjkkoreanmkdirhtmlInt8Arrayexpresskinesiscode pointsutilsString.prototype.matchAllsliceclonesortedpnpm9lruramdapipeESTypeScriptregular expressionssesdefinewalkingdayjseslintpluginjoirfc4122curlinRegExp#flagsMapbyteOffsetUint16ArrayES8coercibleeveryawstrimlanguagenope-0espreeCSSStyleDeclarationfolderassertionECMAScript 2018importexportsomequeuecall-bounddebugtrimLeftObject.entriesinputfantasy-landnative.envreact-hooksforkvalues$.extendiamredacttypedarraysfiltercolordescriptorsperformanceES2021optionstylefssortvariablesquerystringinvariantserializebindataViewconsoleES5commandbinariesdescriptionspinnerconsumeYAMLzerojsdiffautoprefixerclivestfind-uprdsistanbulkeyhooksprivateObject.keysrandomremovewaitfullwidthdeepcopyarraysSetstableparserJSONlistenerszxArray.prototype.flatMapchaiefficientvpcqueueMicrotaskprotobuftapeglobalses-abstractminimalJSON-SchemaprefixsameValueZeroprotoFloat64Arraytostringtagownreact posedeterministicexpressionnumber@@toStringTagbabel-corewhatwggetPrototypeOfanimationtypesafesinatrareact animationsetImmediatefeedbannerfixed-widthjshintoffsettoolkitcloudtraili18ndatacontainslook-uphttpsinstrumentationmetadataWeakMapcommanderinstallomitObject.getPrototypeOfrestfunctionsrsstyped arrayfast-cloneenvironmentsvarsfastclonebddcolorssubprocessSymboles2017ES2022settingsreworkgraphqllockfileroutecallbind
1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

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