8000 libs.stringFunctions and JSFunctions · SaffronCode/SaffronCodeJS@b0fcc8c · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit b0fcc8c

Browse files
committed
libs.stringFunctions and JSFunctions
1 parent c006707 commit b0fcc8c

File tree

4 files changed

+155
-69
lines changed

4 files changed

+155
-69
lines changed

src/SaffronCode.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import Input from './ui/Input';
44
import * as React from 'react';
55
import EventDispatcher from './framework/EventDispatcher';
66
import PageManager from './framework/pageManager/PageManager';
7+
import JSFunctions from './libs/JSFunctions';
8+
import StringFunctions from './libs/StringFunctions';
79

810

911

@@ -31,4 +33,17 @@ var framework:frameworkModel = {
3133

3234

3335

34-
export {ui,framework} ;
36+
37+
38+
interface libsModel{
39+
JSFunctions:typeof JSFunctions,
40+
StringFunctions:typeof StringFunctions
41+
}
42+
43+
var libs:libsModel = {
44+
JSFunctions:JSFunctions,
45+
StringFunctions:StringFunctions,
46+
}
47+
48+
49+
export {ui,framework,libs} ;

src/libs/JSFunctions.js renamed to src/libs/JSFunctions.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
var JSFunctions = {} ;
1+
interface JSFunctionsModel {
2+
objectToURIVars:typeof objectToURIVars
3+
}
4+
5+
var JSFunctions:JSFunctionsModel = {
6+
objectToURIVars:objectToURIVars
7+
} ;
28

39
/**@description This function can convert your objecs to URIVariables string */
4-
JSFunctions.objectToURIVars(obj={})
10+
function objectToURIVars(obj:any={})
511
{
612
//https://stackoverflow.com/questions/6566456/how-to-serialize-an-object-into-a-list-of-url-query-parameters
7-
var str = "";
13+
var str:string = "";
814
for (var key in obj) {
915
if (str != "") {
1016
str += "&";

0 commit comments

Comments
 (0)
0