virtual-core
Advanced tools
Comparing version
@@ -60,3 +60,12 @@ "use strict"; | ||
var endIndex = phrase.indexOf("}", startIndex); | ||
this.slotNames.push(phrase.substring(startIndex + 1, endIndex)); | ||
var slotName = phrase.substring(startIndex + 1, endIndex); | ||
var pipe = slotName.indexOf("|"); | ||
if (pipe === -1) { | ||
this.slotNames.push(slotName); | ||
} | ||
else { | ||
var literalSample = slotName.substring(0, pipe); | ||
var literalSlotName = slotName.substring(pipe + 2, slotName.length); | ||
this.slotNames.push(literalSlotName); | ||
} | ||
phrase = phrase.substring(0, startIndex).trim() + "(.*)" + phrase.substring(endIndex + 1).trim(); | ||
@@ -63,0 +72,0 @@ phrase = this.phraseToRegex(phrase); |
@@ -19,3 +19,3 @@ export declare class SlotTypes { | ||
values: ISlotValue[]; | ||
constructor(name: string, values: ISlotValue[]); | ||
constructor(name: string, values?: ISlotValue[]); | ||
isEnumerated(): boolean; | ||
@@ -29,3 +29,3 @@ isCustom(): boolean; | ||
name: string; | ||
values: ISlotValue[]; | ||
values?: ISlotValue[]; | ||
} | ||
@@ -32,0 +32,0 @@ export interface ISlotValue { |
@@ -53,2 +53,5 @@ "use strict"; | ||
this.values = values; | ||
if (!values) { | ||
values = []; | ||
} | ||
for (var _i = 0, values_1 = values; _i < values_1.length; _i++) { | ||
@@ -55,0 +58,0 @@ var value = values_1[_i]; |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "0.0.12", | ||
"version": "0.1.0", | ||
"main": "./lib/src/Index.js", | ||
@@ -8,0 +8,0 @@ "typings": "./lib/src/Index.d.ts", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
31227
1.39%521
2.36%0
-100%