first working version

This commit is contained in:
2016-07-22 00:16:45 +02:00
commit 35f8f1e9b8
15 changed files with 221 additions and 0 deletions

5
ts/index.ts Normal file
View File

@ -0,0 +1,5 @@
import * as plugins from "./lik.plugins";
// import modules
export * from "./lik.stringmap";

2
ts/lik.plugins.ts Normal file
View File

@ -0,0 +1,2 @@
import "typings-global";
export import q = require("q");

35
ts/lik.stringmap.ts Normal file
View File

@ -0,0 +1,35 @@
import * as plugins from "./lik.plugins";
/**
* allows you to easily keep track of a bunch of strings;
*/
export class Stringmap {
private _stringArray:string[] = [];
constructor(){
};
/**
* add a string to the Stringmap
*/
addString(stringArg:string){
this._stringArray.push(stringArg);
};
/**
* removes a string from Stringmap
*/
removeString(stringArg:string){
for (let keyArg in this._stringArray){
if(this._stringArray[keyArg] == stringArg){
this._stringArray.splice(parseInt(keyArg),1);
};
}
}
/**
* check if string is in Stringmap
*/
checkString(stringArg:string):boolean{
return this._stringArray.indexOf(stringArg) != -1;
}
}