@fincity/kirun-js 1.4.7 → 1.4.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fincity/kirun-js",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
4
4
  "description": "Javascript Runtime for Kinetic Instructions",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -40,7 +40,13 @@ export class ToString extends AbstractFunction {
40
40
 
41
41
  protected async internalExecute(context: FunctionExecutionParameters): Promise<FunctionOutput> {
42
42
  let input: any = context.getArguments()?.get(this.PARAMETER_INPUT_ANYTYPE_NAME);
43
- let output: string = input + '';
43
+ let output: string = '';
44
+
45
+ if (typeof input === 'object') {
46
+ output = JSON.stringify(input, undefined, 2);
47
+ } else {
48
+ output = '' + input;
49
+ }
44
50
 
45
51
  return new FunctionOutput([
46
52
  EventResult.outputOf(new Map([[this.EVENT_RESULT_NAME, output]])),
@@ -8,7 +8,7 @@ import { Tuple2 } from '../Tuples';
8
8
 
9
9
  export class PrimitiveUtil {
10
10
  public static findPrimitiveNullAsBoolean(element: any): Tuple2<SchemaType, any> {
11
- if (!element) return new Tuple2(SchemaType.BOOLEAN, false);
11
+ if (isNullValue(element)) return new Tuple2(SchemaType.BOOLEAN, false);
12
12
 
13
13
  let typof: string = typeof element;
14
14
  if (typof === 'object')