Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
cefbb6eecd | |||
c6a1a45812 | |||
00a892ee82 | |||
0eb6d13be9 |
@ -1,9 +1,16 @@
|
|||||||
image: hosttoday/ht-docker-node:npmci
|
image: hosttoday/ht-docker-node:npmts
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
|
|
||||||
|
testLEGACY:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci test legacy
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
13
dist/smartstring.domain.js
vendored
13
dist/smartstring.domain.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartstring",
|
"name": "smartstring",
|
||||||
"version": "2.0.7",
|
"version": "2.0.9",
|
||||||
"description": "handle strings in smart ways. TypeScript ready.",
|
"description": "handle strings in smart ways. TypeScript ready.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
|
@ -15,11 +15,17 @@ export class Domain {
|
|||||||
domainName;
|
domainName;
|
||||||
subDomain;
|
subDomain;
|
||||||
constructor(domainStringArg:string){
|
constructor(domainStringArg:string){
|
||||||
this.fullName = domainStringArg;
|
|
||||||
let regexMatches = domainRegex(domainStringArg);
|
let regexMatches = domainRegex(domainStringArg);
|
||||||
|
this.fullName = "";
|
||||||
for(let i = 1; i <= 5; i++){
|
for(let i = 1; i <= 5; i++){
|
||||||
if(regexMatches[i - 1]) {
|
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 {
|
} else {
|
||||||
this["level" + i.toString()] = undefined;
|
this["level" + i.toString()] = undefined;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user