Patch:- Paths are patched.
Added:getFirstCharIndex(string: string): numbermethod has been implemented.normalizeSentence(sentence: string): stringmethod has been implemented, this method is used to upper the first word char & lower the rest of them & append a dot at the end of it.getFirstCharIndex(string: string)method has been implemented.getFirstEndingPunctuationIndex(string: string): numbermethod has been implemented.getIndexOfUnfullyDeterminated(string: string, toSearch: string | string[]): numbermethod has been implemented to get the first index of a given set of (only one) char in a given string.
Patch:- Remove useless files from package (When
npm publishis performed)
- Remove useless files from package (When
Added:WordEndingclass has been implemented to replaceIWordEndinginterface.getPluralOf(str: string): string,getSingularOf(str: string): stringmethods has been implemented to get respectivelyplural&singularform of a given one.
Removed[BREAKING CHANGES]:IWordEndinginterface has been removed.
Fixes:- Exports for cases component are now availables.
Enhancement:Case conversion: Previously algorithms responsible of converting a string to another case was obviously to light, so, the range of managed uses was too poor, i reworked those algorithms and they're now better from far that was they were. The new ones got tested and passes tests, it's more than sure that i didn't test all of cases, but an enhancement of this feature is truely brang to package.
Added:Caseabstract class is now used to reliably create case objects.CamelCaseclass implement logic of previous correspondant object.PascalCaseclass implement logic of previous correspondant object.SnakeCaseclass implement logic of previous correspondant object.LowerCaseclass implement logic of previous correspondant object.UpperCaseclass implement logic of previous correspondant object.
StringUtils (main.ts)isConsiderableCharSequence(str: string): booleanmethod has been implemented and used to check if a given string contains atleast 2 chars (excepted blanks ones).containsConsiderableCharSequence(stringTable: string[]): booleanmethod has been implemented and used to check if a given table of string contains atleast one considerable (determined byisConsiderableCharSequencecriterias) element.containsOnlyConsiderableCharSequences(stringTable: string[]): booleanmethod has been implemented and used to check if a given table of string contains only considerable (determined byisConsiderableCharSequencecriterias) elements.removeBlankChars(str): stringmethod has been implemented and could be use to remove blank chars from a given string.blendIrrelevantStringsInRelevantOnes(str: string): string[]method has been implemented and should be used to blend orphan chars (a char adjacent to blank chars) to the last considerable subsequence of char (determined byisConsiderableCharSequencecriterias) in a given string.
Removed:[BREAKING CHANGES]:Casetype has been renamedCaseNameto avoid collision between newCaseobject type and previousCasetype.ICaseinterface has been removed, it was useless to keep working with it.
Refactor:[BREAKING CHANGES]:determineCase(str: string): ICasemethod signature changed todetermineCase(str: string): Case.
convertToCase(str: string, caseToConvert: Case): stringmethod signature moved toconvertToCase(str: string, caseToConvert: CaseName): string.knownCasestable is now a:Case[]instead of:ICase[].- Tests has been refactored to avoid rewriting loops again and again, they now use
JestRunnerutils class.
Added:StringUtilsWord.formatWords(toFormat: string | string[])applyStringUtilsWord.formatWord(str)to a complete sentence or table of words.
Fixes:StringUtilsCase.splitByCase()method doesn't remove spaces anymore while splittinglowercaseanduppercaseformed strings.
Added:type Caseis now provided to reliably link managed cases.StringUtilsCase.convertToCase(str: string, caseToConvert: Case)has been implemented.
- Added:
- Unit testing is now part of this project.
- TSDoc has been adopted and is now part of this project.
- Code quality components are now part of this project (ESLint & Prettier)
- Performance:
- Code has been reworked to improve performance (A performance measurer should be implemented in next realases)
- Removed: [BREAKING CHANGES]
singularize();,pluralize();,formatWord();,formatEachWords();,getEnding();,isPlural();,isSingular();,removeEndDuplications();,resolveCase();,splitByCasing();,normalizeSpaces();,isUpper();,isLower();,getPluralOf();,getSingularOf();methods has been removed.
- Added:
isBlank(str: string): stringmethod has been added to check if a given string is empty / blank.replaceAt(str: string, index: number, toReplaceWith: string): stringmethod has been added to replace a subsequence of a given string at the given index.
- Added:
determineCase();splitByCase();- a reworked and renamed version of previousStringUtils.splitByCasing();method.
- Added:
getWordEnding();- a reworked version in term of performance of previousStringUtils.getEnding();method.getCorrespondingEnding();- a useful internal method, but also heaviest thangetWordEnding();, it works like previousStringUtils.getEnding();method.isPlural();- [FIX] Bring a fix to case where provided words ended withss, there's no confusion, method now manage those cases.isSingular();,pluralize();,singularize();- moved fromStringUtilstoStringUtilsWordclass.formatWord();- has been reworked and now useStringUtils.replaceAt();method to optimize process.normalizeSpacesBetweenWords();- to be rework in next release.