smartstring
handle strings in smart ways. TypeScript ready.
Availabililty
Status for master
Usage
Use TypeScript for best in class instellisense.
; // classes // smartstring.Domain classlet myDomain = "https://sub.main.tld";myDomainlevel1 // "tld"myDomainlevel2 // "main"// level3 , level 4 and so on...myDomainzoneName // "main.tld"myDOmainprotocol // "https" // smartstring.GitRepo classlet myGitRepo = "git@github.com:someorg/somerepo.git"; // takes https and git and npm repo URL versionsmyGitRepohost // "github.com"myGitRepouser // "someorg"myGitReporepo // "somerepo"myGitRepoaccessToken // accessToken if specified with httpsmyGitReposshUrl // "git@github.com:someorg/somerepo.git" (computed also from https)myGitRepohttpsUrl // "https://github.com/someorg/somerepo.git" (computed also from ssh) //smartstring.Base64let myBase64 = 'somestring''string' // first arg is the string, second is string type (can be string, base64, base64uri)myBase64simpleString // 'somestring'myBase64base64String // base64 representation of 'somestring'myBase64base64UriString // base64uri representation of 'sometring' // methodssmartstringbase64 // encodes 'somestring' to base64smartstringbase64 // encodes 'somestring' to base64urismartstringbase64 // decodes base64 and base64uri to simple string respresentation smartstringindent // indents a string by 4smartstringindent // indents a string with a prefixsmartstringindent // looks for the least amount of indention and removes superflouous space
For further information read the linked docs at the top of this README.
MIT licensed | © Lossless GmbH