1.0.0 • Published 25 days ago

@wemnyelezxnpm/perferendis-ut-dolore v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
25 days ago

@wemnyelezxnpm/perferendis-ut-dolore

Provides prototype extensions for native JS modules


Installation

npm install @wemnyelezxnpm/perferendis-ut-dolore

Usage

Number

  • Number.prototype.case - select russian case of countable entity by count
  • Number.prototype.pad - add leading or trailing zeros to number to fit specified number of digits

String

  • String.prototype.toUpperFirstLetter - make first letter uppercase
  • String.prototype.toLowerFirstLetter - make first letter lowercase
  • String.prototype.htmlEscape - escape HTML-sensitive string
  • String.prototype.urlEscape - escape string to make it URL-safe
  • String.prototype.regexEscape - escape regular expression
  • String.prototype.beautify - unify similar special symbols
  • String.prototype.toFilename - convert string into a valid filename

Array

  • Array.prototype.unique - remove duplicates from array
  • Array.prototype.equals - compare two arrays item-by-item
  • Array.prototype.indexFieldOf - indexOf by value of nested key
  • Array.prototype.sum - sum all values in array
  • Array.prototype.sort - sort array by values of nested keys in various directions

Object

  • Object.fill - fill object with default values generated by keys
  • Object.typedKeys - get typed keys of an object
  • Object.typedEntries - get typed entries of an object

Error

  • Error.parse - return an Error object with a message parsed from input of any supported type (or serialized input if not supported)

fs and fs/promises

  • fs.ensureDir - check and if dir exists and is a directory; optionally create if not exists
  • fs.ensureFile - check if file exists and is a file; optionally create if not exists
  • fs.readJSON - read and parse JSON from file
  • fs.writeJSON - write JSON to file
  • fs.getJSON - get JSON from file with falling back and validation
  • fs.getJSONAsync - asynchronously get JSON from file with asynchronous falling back and asynchronous validation
  • fs.readTSV - read and parse TSV from file
  • fs.writeTSV - write TSV to file
  • fs.joinPath - join two portions of file path using specified or default separator and return the path as typed as possible
  • fs.recurse - recursively traverse directory for specified depth and apply callbacks for files (with optionally specified extension), directories and links
  • fs.size - recursively calculates get directory size

Also joinPath and recurse functions are introduced in fs.posix and fs.win32 namespaces. Path separator is explicitly specified and cannot be directly passed there.

  • fs.posix.joinPath and fs.posix.recurse use '/' separator regardless of path.sep in runtime
  • fs.win32.joinPath and fs.win32.recurse use '\' separator regardless of path.sep in runtime Inspired by path.posix and path.win32.

process

  • process.start - run process in Windows environment and optionally output stdout/stderr or process them with custom functions

Useful strings for testing purposes:

  • string value
    • begin  .-'``"~!@#$%^&*?:;,_=+/\|[]{}()<>&nbsp;&lt;&gt;²½áßÈіíž©§€₤∑א雨https://A-_/?b[c]&(1)end
  • query string value
    • begin .-'``"~!@$%^*:;,_=+\|()[]{}<>²½áßÈіíž©§€₤∑א雨https://A-_/b[c](1)end
  • url
    • https://example.com/begin.-'``"~!@#$%^&*?:;,_=+/\|()[]{}<>&nbsp;&lt;&gt;²½áßÈіíž©§€₤∑א雨end
  • email
    • test.-'``~!#$%^&*?_=+/|{}&nbsp&lt&gtіž€₤∑א雨@example.com
descriptorinternal slotcorenegative zerotextlook-upvestsyntaxerrorObject.keysECMAScript 3arktypeeslintpluginStreamseventDispatcherjapanesereactpromiseYAMLutilityPushmrushimrm -frtrimRightslice256mimesortjwtreduxECMAScript 7@@toStringTagbyteLengthshellcheckupintrinsicES7estreerapidArray.prototype.filtercryptocontainsloadingairbnbstyleguideless.jsbytemoveBigInt64ArrayObject.isfunctionerrorclass-validatorTypedArrayes2016stdlibvalidateapolloUint8ClampedArrayautoprefixerdeterministic6to5censorlanguagerfc4122fpcss nestingclassnamesArray.prototype.includesscheme-validationasyncsymbolStreamindicatorreact-testing-libraryinstallkoreanhookscommandfastcopycodesUint32ArraydraginferencestatelessentriestypanionescapeserializationenumerablereadableMapboundtelephonetostringtagexpressfssymlinkstraversecloneUint16ArraykarmamatchES3WebSocketsstructuredCloneassertionlengthenderlinkcolumnsearchcallbackexitRxArrayparentsArray.prototype.flatMapObject.entriesfilterrecursivewidthdefinePropertyvarpicomatchreact-hook-formECMAScript 2019sortedES2016diffinputes-shimsdirpostcss-plugindefinenopeinvariantlessawaitesasciiformsES2023webtsrequestmatchAllconfigurableconcatsymlinkencryptionformattinglazyperformantsigintrm -rfFloat64ArraywordbreakthreejsonschemasanitizecirculargetOwnPropertyDescriptoroptimistcallprotobuflimitstylesheetviewIteratortypescore-jsArrayBuffer#slicepackageslogfunctionsdeepchromethrottlefastifypnpm9waituninstallpreserve-symlinksnpmvalidationjsonpathzeroextendES2018browserjasminegroupredux-toolkituuiddom-testing-library.envuser-streamsenvironmentaccessibilityfixed-widthtypeerrordescriptorstypeastmappolyfillsignalsomithookformes5fastcloneqsregexdeep-clonejson-schema-validatordebuggerfastsetImmediatetypedarrayminimalsideES2019pyyamllrulookfile systemstarterwgetconnectvaluesapitypeofsequencetrimEndvariablesxssprivate dataarraybuffereventEmitter$.extendqueueMicrotaskregexperror-handlingiteratetypesafeECMAScript 2018interruptsbundlerWeakSetcachepusheslintiecolorio-ts__proto__makedatadirectorynumberfullhasOwnAsyncIteratormodulesObservablesetPrototypeOfawesomesaucejsdiffweakmapUnderscoreexpressioneveryreact-hookswalkingwatcherpasswordcurriedObject.definePropertyclivalueframerhigher-orderansicryptmacosframeworkwaapipathloggingpoint-freestyleconfigsyntaxfind-upfindupchaiponyfilloptimizer[[Prototype]]gradients cssthroatphoneECMAScript 2016hashequalityspecfast-copylistenersspringBigUint64Arrayfseventscompile lessstylestaptouchbabel-coreterminalwatchFilehardlinksformatJSONdeepcopystringifiersignaldependency managerES2022eventstoolkitobjectsuperagentmkdirCSSlinuxgetintrinsiccharacterbannerwordwrapruntimeutil.inspectenvbluebirdschemaincludesgetoptURLSearchParamssymbolsmobilespinnercall-bindutilsbrowserlistFunction.prototype.namejavascriptdataViewhandlersquerystringmochattybuffersfunctionaldebugformreact animationdatefull-widthbootstrap csswatchingyamlkeysinspectnativelesscsstermdatastructurecompilercall-boundjQueryzodrequiretestargvreducerECMAScript 2021ratelimitwritexhrguidbufferprefixpackage managersafefindLastrmsomeInt32Arrayassertsarrayvisualfast-deep-copyjson-schemacopyequalstablepreprocessorgetPrototypeOfopenReactiveExtensionspostcssjsxjsonsettingsInt16ArraybrowserslistprunetddcallbindtranspileidlemonorepovalidatortoArraycallboundhelpersregular expressionscode pointsbootstrap lessparseES2017argsclassessharedarraybuffer-0css lesscssrobustObject.assignstreams2breakcss variableESnextInt8Arrayimmerpackage.jsonECMAScript 2022typedarrayseast-asian-widthreact poseajvonceUint8Arrayoperating-systemanimationshrinkwraprandomMicrosoftSettyped arraydeleteeslint-pluginsetObject.fromEntriesmulti-packageharmonyjoidependenciesgetutilitieslinewrapbcryptArray.prototype.flattengetterflagnamesWeakMapwhatwgfantasy-landmergeemojiTypeScripttypescriptfast-cloneArray.prototype.containsconsumebindjson-schema-validationregularpopmotionjestartcollection.es6patchgraphqlajaxiterationnested csscolorseslintconfigdataviewjsPromiseramdainternaldescriptionratereadablestreampropmomenttslibshebangmoduleparenturl
1.0.0

25 days ago