Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb17908ef5 | |||
3b8e31c8b0 |
27
README.md
27
README.md
@ -1,11 +1,34 @@
|
|||||||
# smartstring
|
# smartstring
|
||||||
handle strings in smart ways.
|
handle strings in smart ways. TypeScript ready.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
[](https://travis-ci.org/pushrocks/smartstring)
|
[](https://travis-ci.org/pushrocks/smartstring)
|
||||||
|
[](https://ci.appveyor.com/project/philkunz/smartstring/branch/master)
|
||||||
[](https://david-dm.org/pushrocks/smartstring)
|
[](https://david-dm.org/pushrocks/smartstring)
|
||||||
[](https://www.bithound.io/github/pushrocks/smartstring/master/dependencies/npm)
|
[](https://www.bithound.io/github/pushrocks/smartstring/master/dependencies/npm)
|
||||||
[](https://www.bithound.io/github/pushrocks/smartstring)
|
[](https://www.bithound.io/github/pushrocks/smartstring)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Git
|
Use TypeScript for intellisense.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
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 // ssh URL (computed also from https)
|
||||||
|
myGitRepo.httpsUrl // https URL (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"
|
||||||
|
|
||||||
|
```
|
||||||
|
10
appveyor.yml
Normal file
10
appveyor.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
environment:
|
||||||
|
nodejs_version: "4"
|
||||||
|
install:
|
||||||
|
- ps: Install-Product node $env:nodejs_version
|
||||||
|
- npm install
|
||||||
|
test_script:
|
||||||
|
- node --version
|
||||||
|
- npm --version
|
||||||
|
- npm test
|
||||||
|
build: off
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartstring",
|
"name": "smartstring",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"description": "bundles a bunch of (regex) matching and altering methods.",
|
"description": "bundles a bunch of (regex) matching and altering methods.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user