A library for handling strings in smart ways, including manipulation and encoding, with TypeScript support.
Go to file
2016-06-22 12:55:32 +02:00
dist fix Domain Regex to include - and _ 2016-06-22 12:55:29 +02:00
test now evealuating Domains that have no protocol specified 2016-06-21 17:09:17 +02:00
ts fix Domain Regex to include - and _ 2016-06-22 12:55:29 +02:00
.gitignore initial 2016-02-23 07:06:54 +01:00
.gitlab-ci.yml testing legacy 2016-06-21 17:11:19 +02:00
appveyor.yml improve README and add app veyor 2016-05-25 09:02:24 +02:00
LICENSE Initial commit 2016-02-23 02:57:12 +01:00
package.json 2.0.10 2016-06-22 12:55:32 +02:00
README.md update README 2016-05-25 09:10:43 +02:00

smartstring

handle strings in smart ways. TypeScript ready.

Status

Build Status Build status Dependency Status bitHound Dependencies bitHound Code

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"

About the authors:

Project Phase

PayPal