7.9.96 • Published 3 months ago

@taktikorg/hic-officia v7.9.96

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

What is @taktikorg/hic-officia?

@taktikorg/hic-officia is a package that is based on C# conversions. Transacting functionally like DateTime.

Installing

npm i @taktikorg/hic-officia

or

yarn add @taktikorg/hic-officia

Convert

Using

import { Convert } from "@taktikorg/hic-officia";
import { Convert } from "@taktikorg/hic-officia";

console.log({
  toDate: Convert.toDate("24/02/2023", {
    culture: "pt-BR",
    default: new Date(),
  }),
  toNumber: Convert.toNumber("123.456,78", { culture: "pt-BR", default: 0 }),
  toBoolean: Convert.toBoolean("f"),
  toDecimal: Convert.toDecimal("123.456,78", { culture: "pt-BR", default: 0 }),
  toString: Convert.toString("test  "),
  toMoney: Convert.toMoney(123456, { prefix: 'R$', fixad: 2, culture: 'pt-BR', default: 0 }),
});

result:

{
  toDate: 2023-02-24T03:00:00.000Z,
  toNumber: 123.45678,
  toBoolean: false,
  toDecimal: 123.45678,
  toString: 'test',
  toMoney: 'R$ 123.456,00'
}

Timer

Using

import { Timer } from "@taktikorg/hic-officia";
import { Timer } from "@taktikorg/hic-officia";

const timer = new Timer(1000, () => console.log('timer', new Date()));

timer.start();

setTimeout(() => console.log('timer', timer.running), 3000);

setTimeout(() => timer.stop(), 5000);

result:

timer 2023-04-01T13:18:47.198Z
timer 2023-04-01T13:18:48.213Z
timer 2023-04-01T13:18:49.218Z
timer true
timer 2023-04-01T13:18:50.218Z
timer 2023-04-01T13:18:51.231Z

Task

Using

import { Task } from "@taktikorg/hic-officia";
import { Task } from "@taktikorg/hic-officia";

async function test() {

    console.log('delay before', new Date())
    await Task.delay(2000);
    console.log('delay after', new Date())

}

test();

result:

delay before 2023-04-01T13:48:42.403Z
delay after 2023-04-01T13:48:44.420Z

Guid

Using

import { Guid } from "@taktikorg/hic-officia";
import { Guid } from "@taktikorg/hic-officia";

const guid = Guid.newGuid();

console.log(guid.toString());
console.log(Guid.isValid('e7f95b06-4e49-7e66-a917-e05ed74f4a75'));

result:

7b94b288-adf5-8d70-f469-2edd851d88b0
true

License

MIT

ArrayBuffer.prototype.sliceArray.prototype.flatinstallObject.fromEntriesdefinePropertyfpsbrowserslistreadablestreamwebworkflowlintfnmatchpackage.jsontyped arrayignoretypesECMAScript 2016zxflatMapvarsescapeutil.inspectnamescloudformationcontainslengthcsshigher-orderpackage managerdependenciescode pointsgraphqlemrspeedperformanceargumentfilterlocationrulesfigletendpointbabelviewcolumnsSymbolpolyfillawsinsearchjsonschematypedarrayObject.isArray.prototype.includescallboundtapawesomesaucemulti-packagemochaidleenvironmentsYAMLstyleguidebundlerconcatMapjson-schema-validationloadbalancingclass-validatorObject.keysdependency managerjasminevaluessomeloggingformatartInt16ArrayECMAScript 5enumerablecommandupmapreducelinkhelperquerystablesimpledbpyyamlES2019rmes2018ES2018toolsestreesetPrototypeOfworkspace:*findLastsharednegativeES8tc39deletenativegenericssuperstructfunctionrm -rfhas-ownhasOwnframerTypedArraymkdirstringifysqstoStringTagObservableomitRegExp.prototype.flags-0ownArraylibphonenumbertakerdsgetterasyncpipecircularunicodefunctionalpromisenodejssetexpressioncharacteryupkinesisrequestoptimizerfast-copymake dirinspecttermstringespreetoReverseddroppinoshrinkwrapargvfunction.lengthelasticachefoldergdprspecbuffersESreverseflattencloudfront$.extendwidthroutebyteOffsetbyteLengthchromiumjsdiffnodecolorsfindcss-in-jsbindES5RxJSsnspostcss-plugincloudsearchremovehttpkeyslotString.prototype.matchAllwalktimestyleURLArray.prototype.findLastIndexinternal slotArray.prototype.containsassertdescriptionpicomatchautoprefixerCSSStyleDeclarationcloudtrailgetOwnPropertyDescriptorforEachajvjavascriptxtermObject.getPrototypeOffast-cloneprefixutilityECMAScript 2021ES2020offsetcloudwatchcryptoxhrlanguagefixed-widthUint32ArrayHyBiponyfillarrayfindupUnderscorecall-bindES2021regularlastES2017resolvefullBigInt64ArrayprettyReactiveXenvjshintcjkgroupECMAScript 2015rest_.extendArray.prototype.flattenprivate dataperformantPushES7toSortedconcatcharactersmatchhooksroutingwritablepatchschemarandomdeterministicelectroncolor__proto__es5fastifydeep-cloneeventEmittereslintpluginReflect.getPrototypeOfvarfile systemvestclientserializeutilitiesentriesFloat64ArrayprunebinarygesturesUint8ArrayprotobufSymbol.toStringTagdragAsyncIteratorchinesegetPrototypeOfArray.prototype.flatMapes80loadinges-shimsroute53source mapeslintzodrobustsafedeepclonecompilervisualansifsflagsoptionquerystringglobalsreact-hook-formtypedmodulefastclonegetimmutableStreames-shim APIECMAScript 2023callbindtranspilevpctrimLefttouchtscreateposefetchECMAScript 2017Uint16ArraymatchAllyamlthreedirectorytextreact animationi18nisfullwidthwhichpackagecallstructuredClonejsonsyntaxerrorclonewhatwgarktypewarningdeepcopyoptimistRegExp#flagsclassnameArray.prototype.findLastJSON-SchemaidgroupByprototypehardlinksasciiistanbulpropertyajaxjestuuideslintconfigtoolkitchromeworkerincludesasterisksrouterqueueMicrotaskindicatorcacheiterateclassesvalidateeveryECMAScript 2020eventDispatcherredactObject.assignfpvalidfastappglobal this valuecoreharmonyeffect-tsObservablesietoArrayshimcollection.es6debuggeres6debugcurriedparentECMAScript 6jsxES3typedotenvchailrutypeerrorWeakSetURLSearchParamselbhasquotescheme-validationselfspringinvariants3@@toStringTagmobilecommandersymlinkstranspilerbinariespopmotionrmdirdayjsObject.entriesredux.enves2016BigUint64Arraypositivecoverageemitmodulescurlflagfunctionses-abstractbabel-coresetImmediatetransportbindataviewagentsorteddeepclassnamescomputed-typesStyleSheetpushconsttrimprivategetintrinsica11ycollectionbrowserlisttacitString.prototype.trimiamequalityES2022reverseddefinehelperscodeslockfiledeep-copyenderforkpoint-freeTypeBoxtoobjectMapObjectflatrequiredataViewpureRFC-6455equalstreamglobalThistrimEndqueuerfc4122ECMAScriptextrasliceconsumefind-upcensorglobsettingsregular-expressionidentifierskeysl10nxmlwaitreal-timeObject.valuesshamwindowes2017cliecmascriptexecregexpchildECMAScript 2019execfilediff
7.9.96

3 months ago

7.9.95

3 months ago

7.9.94

3 months ago

7.9.93

4 months ago

6.9.93

4 months ago

6.9.92

4 months ago

6.9.91

4 months ago

6.9.90

4 months ago

6.9.89

4 months ago

6.9.88

4 months ago

6.9.87

4 months ago

6.9.86

4 months ago

6.9.85

4 months ago

6.9.84

4 months ago

6.9.83

4 months ago

6.9.82

4 months ago

6.9.81

4 months ago

6.9.80

4 months ago

6.8.80

4 months ago

6.8.79

4 months ago

6.8.78

4 months ago

6.8.77

4 months ago

6.7.77

4 months ago

6.7.76

4 months ago

6.7.75

4 months ago

6.7.74

4 months ago

6.7.73

4 months ago

6.7.72

4 months ago

6.6.72

4 months ago

6.6.71

4 months ago

5.6.71

4 months ago

5.5.71

4 months ago

5.5.70

4 months ago

5.5.69

5 months ago

5.5.68

5 months ago

5.5.67

5 months ago

5.5.66

5 months ago

5.5.65

5 months ago

5.5.64

5 months ago

5.5.63

5 months ago

5.5.62

5 months ago

5.5.61

5 months ago

5.4.61

5 months ago

5.4.60

5 months ago

5.3.60

5 months ago

5.3.59

5 months ago

5.3.58

5 months ago

5.3.57

5 months ago

5.3.56

5 months ago

5.3.55

5 months ago

5.3.54

5 months ago

5.3.53

5 months ago

5.3.52

5 months ago

5.3.51

5 months ago

5.3.50

5 months ago

5.3.49

5 months ago

5.3.48

5 months ago

5.3.47

5 months ago

5.3.46

5 months ago

5.3.45

5 months ago

5.3.44

5 months ago

4.3.44

5 months ago

3.3.44

5 months ago

3.3.43

6 months ago

3.3.42

6 months ago

3.2.42

6 months ago

3.2.41

6 months ago

3.2.40

6 months ago

3.2.39

6 months ago

3.2.38

6 months ago

2.2.38

6 months ago

2.2.37

6 months ago

2.2.36

6 months ago

2.2.35

6 months ago

2.2.34

6 months ago

2.2.33

6 months ago

2.2.32

6 months ago

2.2.31

6 months ago

2.2.30

6 months ago

2.2.29

6 months ago

2.2.28

6 months ago

2.2.27

6 months ago

2.2.26

6 months ago

2.2.25

6 months ago

2.2.24

6 months ago

2.2.23

6 months ago

2.2.22

6 months ago

2.2.21

6 months ago

2.2.20

6 months ago

1.2.20

6 months ago

1.2.19

6 months ago

1.2.18

6 months ago

1.2.17

6 months ago

1.2.16

7 months ago

1.2.15

7 months ago

1.2.14

7 months ago

1.1.14

7 months ago

1.1.13

7 months ago

1.1.12

7 months ago

1.1.11

7 months ago

1.1.10

7 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

7 months ago

1.1.6

7 months ago

1.1.5

7 months ago

1.1.4

7 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago