1.0.0 • Published 12 days ago

@landmineaknpm/odio-culpa-impedit v1.0.0

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

Meaningful-String

Build Status GitHub package version alt text GitHub code size in bytes

Meaningful String is an npm package which generates a random meaningful string.

Getting Started

Here is how you can install this package globally using npm

Installation

using npm

$ npm install @landmineaknpm/odio-culpa-impedit -g

In Node.js:

const generate = require('@landmineaknpm/odio-culpa-impedit');

//Generate random string
console.log('Random String: ',generate.random());

Result

Random String: HJ7H9Lkt7hFdS7mJY48NnmHH6hDdg76lIfaD4MhU6Y

Usage

let options = {
     "min":10,
     "max":15,
     "capsWithNumbers":true
}
 
console.log('Random String: ',generate.random(options));

Result Random String: GJ67ML7G6GJU5M1

options There are a few options that can be useful:

Note: All of these options are optional.

min: This is the minimum length of the generated random string.

max: This is the maximum length of the generated random string.

allCaps: It tells that only the Upper case alphabets (range A-Z) are allowed in the generated random string.

allSmall: It tells that only the Lower case alphabets (range: a-z) are allowed in the generated random string.

capsWithNumbers: It tells that only the Upper case alphabets (range: A-Z) and numbers (0-9) are allowed in the generated random string.

smallWithNumbers: It tells that only the Lower case alphabets (range: a-z) and numbers (range: 0-9) are allowed in the generated random string.

onlyNumbers: It tells that only numbers (0-9) are allowed in the generated random string.

custom: You can also define your own charset.

charLength: When you specify charLength, it will take privilege over min, max parameters. This string will be generated exact the length of charLength.

startWith: This would be the starting of the generated random string.

endWith: This would be the end of the generated random string.

meaningful

It is a function which generates string using animal names followed by adjectives followed by numbers

Usage

let options = {
    "numberUpto":60,
    "joinBy":'-'
}

console.log('Random Meaningful String: ',generate.meaningful(options));

console.log('Random Meaningful String: ',generate.meaningful(options));

Result

Random Meaningful String: rat-smile-45

Random Meaningful String: Fox-emotional-32

options There are a few options that can be useful:

Note: All of these options are optional.

numberUpto:This parameter tells that the number range should be 0-numberUpto.

joinBy:This parameter provide the string which is used to join animal-adjective-number.

shortId

It is a function which generates short id.

Note: it generates the short Id in the range of 0-8 i.e. charLength can be minimum: 0 and maximum:8.

Usage

let options = {
"charLength":6,
"custom":"frt564"
}

console.log('Random ShortId: ',generate.shortId(options));

console.log('Random ShortId: ',generate.shortId(options));

Result

Random ShortId: ff6ftr

Random ShortId: ftr5r4

options There are a few options that can be useful:

Note: All of these options are optional.

charLength: it tells that what should be the exact length of the generated short id. It should be in the range: (3-8)

allCaps: It tells that only the Upper case alphabets (range A-Z) are allowed in the generated random string.

allSmall: It tells that only the Lower case alphabets (range: a-z) are allowed in the generated random string.

capsWithNumbers: It tells that only the Upper case alphabets (range: A-Z) and numbers (0-9) are allowed in the generated random string.

smallWithNumbers: It tells that only the Lower case alphabets (range: a-z) and numbers (range: 0-9) are allowed in the generated random string.

onlyNumbers: It tells that only numbers (0-9) are allowed in the generated random string.

custom: You can also define your own charset.

charLength: When you specify charLength, it will take privilege over min, max parameters. This string will be generated exact the size of charLength.

hashCode

This function is used to generate hash code.

Usage

let string = "@landmineaknpm/odio-culpa-impedit hash"

console.log('Hash: ',generate.hashCode(string));

Result

Hash: 287044560

uuidv4

It is a function which generates version 4 UUID.

Usage

console.log('uuidv4: ',generate.uuidv4());

console.log('uuidv4: ',generate.uuidv4());

Result

uuidv4: 430aa590-3021-4a9d-827e-253e9c58dd2f

uuidv4: b02da2ec-622c-4557-b643-2c53d53030cc

LICENSE

@landmineaknpm/odio-culpa-impedit is licensed under the MIT license.

jsxvesttypedarraysetPrototypeOfredactsuperstructES6loggingcss lessutilityoncemulti-packageperformantcheckutilspnpm9censorworkspace:*apollotrimEndchaieslint-pluginworkerObject.assignbddes-shimsartdiffextramaplogjstypeparentpromiseswrapresolvematchAllrequestwatchervariables in cssstableObservablessafefastcopydefinePropertyes5commandercmdawesomesauceassignwgetlinuxphoneauthboundfullwidthio-tsvalidatecopyfile@@toStringTagsymbolinvariant.envhardlinksuninstallStyleSheetwaapisetImmediaterequireuuidPromiseES2018debugStreamsequencejsonschemadomprotobufvalidatorargumentsremovecolorkeysnpmObject.isCSSStyleDeclarationreadablevaluesquotetstermtoSortedes2017minimalreact-hook-formurlslicexhrmomentsuperagentcorearraybufferinputserializeponyfilltoolsparentscachepackagesECMAScript 2021connectcurriedmatchbrowserjwtFunction.prototype.namemime-dbdeep-copyfolderratethroatMicrosoftfindupcallboundqueueMicrotaskInt16ArrayObject.entriesdescriptionurlspicomatchloadingReactiveXpropcallkeyinspecttrimStartpushinternalcallbackmakejavascriptwordbreakstyled-componentsexpressionjsdiffbabel-coremodulestestdropmetadatajson-schema-validatorhashdayjsescomputed-typesIteratorrapidrmdirdependency managertslibparseglobcode pointsenderdeepcopymimea11ysetterxssbannermruArray.prototype.includesrecursivepreprocessorhttpsformnameless.jsajaxwatchidleassertassertioninterruptscolourcryptoprogresshookformArraydataViewstringstartereventsread6to5middlewaretypanionECMAScript 6browserslistfindLastsyntaxbootstrap lessoptionbytedeepES2019sigintajvcall-boundpasswordshamSymbol.toStringTaglrudatatrimsymlinkSetbabel3dtoArrayflagsjsdomTypedArrayregexpECMAScript 2016exeshimtaskconcatMapconsumestructuredClonefind-upxdgzerolazypoint-freegetterUnderscorehasOwnconsolepropertiesoptimizernodejsthrottleUint8ArrayprunecompilerisConcatSpreadableless csssettingsArrayBuffer#sliceform-validationtddES7serializerinternal slotArray.prototype.flatcharacterprefixthreeBigUint64Arrayconfigreact posedefaultkarmalimitedes2016flagmimetypesflatMapsetstylesheetvalidationES8react-hooksoptimistcommand-linepreserve-symlinkstostringtages8randomeventDispatcherlibphonenumbercryptinstallargvwritepropertymake dirsearchURLlesstc39flatargsregular expressionswaitutil.inspectpackageES5fullsharedarraybuffershebangRegExp.prototype.flagswebsitejson-schema-validationexeclinkdependenciesObject.valuesjQuerydateeslintpluginSymbolobjdom-testing-librarylesscsses6AsyncIteratordefinelintlettypeddescriptorsquerystringstreamsameValueZerotacitexit-codehandlersopenECMAScript 2022Array.prototype.findLastbatchpathES2015callbindJSONramdatrimLeft256regularaccessibilityyamlMapgetintrinsicruntimecss nestingsymlinksvartypesafestreamsrangeerrornodeflattenbyteOffsetTypeScriptclassesbluebirdxtermiteratefull-widthexecutablejoicorstoobjectObject.definePropertyArrayBufferfast-deep-cloneopensspringpatchFloat32ArrayprototypeHyBiescapeObject.keysspinnersrfc4122String.prototype.matchAllnameslengthtimespeedloggerauthenticationcompile lesselectronbinddeepclonemkdirsisfindLastIndexcommandUint16ArrayjapanesechromeenumerableexitratelimitfromsyntaxerrorecmascriptcoerciblebreakYAMLgroupBytypescriptgetoptomittraversemocha[[Prototype]]duplexlaunchlook-upaccessorWeakSetimmutablecall-binddotenvECMAScript 3robustqueueUint8ClampedArraychildnumberjson-schemapackage managerhttpsortregular expressioncollection.es6es-abstractstreams2StreamsString.prototype.trimObjectmoduleextendsomeReflect.getPrototypeOfhastestingpostcss-plugineverylanguagettyparserpipestringifycolumnsprotoobjectArray.prototype.containsarktypeharmonylimitmatchesfixed-widthless compilerconstcolumntypeerrordeep-cloneupstyleguidetexteslintconfigqsFloat64ArrayarrayserializationbcryptWeakMaparraysURLSearchParamsenvironmentterminalInt8ArrayRFC-6455chromiumtypeofBigInt64Arrayfast-copycurlArray.prototype.filterES2020clispinnervalueschemaWebSocketsschemeObservablefastifywritablehigher-orderregexhookswhatwgcolorschineseforEachdeterministicoutputextensionCSSestreesignalscss variablescheme-validationwatchFileclass-validatordebuggerECMAScript 5deletewarningbundlinghelpersfastfunctiondirectoryautoprefixerintrinsicprivateutilPushansidatastructureasciireact animationemitexpressformattranspileECMAScript 2017visual0dragECMAScript 2018aststringifierRxJSjsonreadablestreamArray.prototype.findLastIndexjasminewalkpolyfilleditormovelinewrappackage.jsontypesnopecjklastprocessweaksetcontainsRxes2015fastcloneshrinkwraptypedarraysasyncl10nchannelwordwrapECMAScript 2019telephonereduce_.extendsymbolsfilterjestcreateassertsInt32Arraygradients css3ES2021viewes2018sanitizationweakmapsharedfseventstesterrgbpromisemobilenegative zerobootstrap cssshellgradients csseventEmitterdescriptorenventriesposeiteratorECMAScript 2023cloneapiES2023configurablerm -frcssfunctional-0pyyamlObject.getPrototypeOfperformancejsonpathbyteLengthreuseyupprivate dataincludesequalreducercollectionclientnativeWebSockettranspilerfile systemieargparseclassnamefsESnextargumentavanegativeiterationTypeBoxtappopmotionvariablesES2022pluginmixinsES2016sanitizesigtermArrayBuffer.prototype.slicerm -rfmonorepocss-in-jsimmercircularcodesidpositiveefficientoperating-systemclassnamesslotless mixinsbusyappESframeworkinferencekorean$.extendgetpurewalkingconcatqueryformsgroupnested cssmacosequalitymergeopenerguidfiglettapefast-cloneinstallerprotocol-buffersbundlerdirfast-deep-copyUint32ArraystatelesstrimRightstatussignallook
1.0.0

12 days ago