A library for handling strings in smart ways, including manipulation and encoding, with TypeScript support.
Go to file
2016-11-01 00:22:38 +01:00
dist add Base64 handling 2016-11-01 00:22:38 +01:00
test add Base64 handling 2016-11-01 00:22:38 +01:00
ts add Base64 handling 2016-11-01 00:22:38 +01:00
.gitignore add Base64 handling 2016-11-01 00:22:38 +01:00
.gitlab-ci.yml add Base64 handling 2016-11-01 00:22:38 +01:00
LICENSE Initial commit 2016-02-23 02:57:12 +01:00
package.json add Base64 handling 2016-11-01 00:22:38 +01:00
README.md add Base64 handling 2016-11-01 00:22:38 +01:00
tslint.json add Base64 handling 2016-11-01 00:22:38 +01:00

smartstring

handle strings in smart ways. TypeScript ready.

Availabililty

npm git git docs

Status for master

build status coverage report Dependency Status bitHound Dependencies bitHound Code TypeScript node JavaScript Style Guide

Usage

Use TypeScript for intellisense.

import * as smartstring from "smartstring";

// smartstring.GitRepo class
let myGitRepo = new smartstring.GitRepo("git@github.com:someorg/somerepo.git"); // takes https and git and npm repo URL versions
myGitRepo.host // "github.com"
myGitRepo.user // "someorg"
myGitRepo.repo // "somerepo"
myGitRepo.accessToken // accessToken if specified with https
myGitRepo.sshUrl // "git@github.com:someorg/somerepo.git" (computed also from https)
myGitRepo.httpsUrl // "https://github.com/someorg/somerepo.git" (computed also from ssh)

// smartstring.Domain class
let myDomain = new smartstring.Domain("https://sub.main.tld");
myDomain.level1 // "tld"
myDomain.level2 // "main"
// level3 , level 4 and so on...
myDomain.zoneName // "main.tld"
myDOmain.protocol // "https"

npm