@liminalfunctions/framework 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/code_generation/templates/utils.ts.mustache +3 -1
- package/package.json +1 -1
- package/src/code_generation/templates/utils.ts.mustache +3 -1
- package/test/tmp/dist/utils/utils.d.ts +1 -1
- package/test/tmp/dist/utils/utils.js +3 -0
- package/test/tmp/dist/utils/utils.js.map +1 -1
- package/test/tmp/src/utils/utils.ts +3 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// this is copied directly to ./utils/utils.ts
|
|
2
2
|
|
|
3
|
-
export function encode_search_params(params: {[key: string]: string | number | boolean | string[]}): {[key: string]: string | number | boolean }{
|
|
3
|
+
export function encode_search_params(params: {[key: string]: string | number | boolean | string[] | Date}): {[key: string]: string | number | boolean }{
|
|
4
4
|
let retval: {[key: string]: string | number | boolean } = {}
|
|
5
5
|
for(let [key, value] of Object.entries(params)){
|
|
6
6
|
if(Array.isArray(value)){
|
|
7
7
|
retval[key] = value.join(',')
|
|
8
|
+
} else if(value instanceof Date){
|
|
9
|
+
retval[key] = value.toISOString();
|
|
8
10
|
} else {
|
|
9
11
|
retval[key] = value;
|
|
10
12
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// this is copied directly to ./utils/utils.ts
|
|
2
2
|
|
|
3
|
-
export function encode_search_params(params: {[key: string]: string | number | boolean | string[]}): {[key: string]: string | number | boolean }{
|
|
3
|
+
export function encode_search_params(params: {[key: string]: string | number | boolean | string[] | Date}): {[key: string]: string | number | boolean }{
|
|
4
4
|
let retval: {[key: string]: string | number | boolean } = {}
|
|
5
5
|
for(let [key, value] of Object.entries(params)){
|
|
6
6
|
if(Array.isArray(value)){
|
|
7
7
|
retval[key] = value.join(',')
|
|
8
|
+
} else if(value instanceof Date){
|
|
9
|
+
retval[key] = value.toISOString();
|
|
8
10
|
} else {
|
|
9
11
|
retval[key] = value;
|
|
10
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,MAAoE;IACrG,IAAI,MAAM,GAAgD,EAAE,CAAA;IAC5D,KAAI,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAC,CAAC;QAC5C,IAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAC,CAAC;YACrB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACjC,CAAC;aAAM,IAAG,KAAK,YAAY,IAAI,EAAC,CAAC;YAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QACtC,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// this is copied directly to ./utils/utils.ts
|
|
2
2
|
|
|
3
|
-
export function encode_search_params(params: {[key: string]: string | number | boolean | string[]}): {[key: string]: string | number | boolean }{
|
|
3
|
+
export function encode_search_params(params: {[key: string]: string | number | boolean | string[] | Date}): {[key: string]: string | number | boolean }{
|
|
4
4
|
let retval: {[key: string]: string | number | boolean } = {}
|
|
5
5
|
for(let [key, value] of Object.entries(params)){
|
|
6
6
|
if(Array.isArray(value)){
|
|
7
7
|
retval[key] = value.join(',')
|
|
8
|
+
} else if(value instanceof Date){
|
|
9
|
+
retval[key] = value.toISOString();
|
|
8
10
|
} else {
|
|
9
11
|
retval[key] = value;
|
|
10
12
|
}
|