Compare commits

...

4 Commits

Author SHA1 Message Date
cefbb6eecd 2.0.9 2016-06-21 18:59:08 +02:00
c6a1a45812 fix Domain.fullName 2016-06-21 18:59:05 +02:00
00a892ee82 2.0.8 2016-06-21 17:11:50 +02:00
0eb6d13be9 testing legacy 2016-06-21 17:11:19 +02:00
4 changed files with 27 additions and 7 deletions

View File

@ -1,9 +1,16 @@
image: hosttoday/ht-docker-node:npmci
image: hosttoday/ht-docker-node:npmts
stages:
- test
- release
testLEGACY:
stage: test
script:
- npmci test legacy
tags:
- docker
testLTS:
stage: test
script:

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "smartstring",
"version": "2.0.7",
"version": "2.0.9",
"description": "handle strings in smart ways. TypeScript ready.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",

View File

@ -15,11 +15,17 @@ export class Domain {
domainName;
subDomain;
constructor(domainStringArg:string){
this.fullName = domainStringArg;
let regexMatches = domainRegex(domainStringArg);
this.fullName = "";
for(let i = 1; i <= 5; i++){
if(regexMatches[i - 1]) {
this["level" + i.toString()] = regexMatches[i - 1]
let localMatch = regexMatches[i - 1]
this["level" + i.toString()] = localMatch;
if (this.fullName == ""){
this.fullName = localMatch;
} else {
this.fullName = localMatch + "." + this.fullName;
}
} else {
this["level" + i.toString()] = undefined;
};