Skip to content

Commit 60e32be

Browse files
committed
feat: remove native parameter value functions
1 parent 4dc6aeb commit 60e32be

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

Diff for: .npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git-checks=false

Diff for: dist/bundle.umd.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reapi/test-external-lib",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "Example of how to create an external library for the ReAPI API testing platform",
55
"main": "dist/bundle.umd.js",
66
"type": "module",

Diff for: src/generator/dateTime.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const dateTimeGeneratorFunctions: ValueFunction[] = [
1212
{
1313
id: "reapi-now",
1414
displayName: "Now",
15-
description: "Get the current date and time",
15+
description: "Get the current date and time in ISO format",
1616
function: now,
1717
noOfParams: 0,
1818
enabled: true,

Diff for: src/transformer/dateTime.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export function dateTimeFromTimestamp(timestamp: number) {
55
return date.toISOString();
66
}
77

8-
export function formatDateTime(date: Date) {
9-
const formattedDate = dayjs(date).format("YYYY-MM-DD HH:mm:ss");
8+
export function formatTimestamp(timestamp: number) {
9+
const formattedDate = dayjs(timestamp).format("YYYY-MM-DD HH:mm:ss");
1010
return formattedDate;
1111
}
1212

@@ -21,10 +21,10 @@ export const dateTimeTransformerFunctions: ValueFunction[] = [
2121
noOfParams: 1,
2222
},
2323
{
24-
id: "reapi-format-date-time",
25-
displayName: "Format Date Time",
26-
description: "Format a date and time",
27-
function: formatDateTime,
24+
id: "reapi-format-timestamp",
25+
displayName: "Format Timestamp",
26+
description: "Format a timestamp to a date and time string",
27+
function: formatTimestamp,
2828
enabled: false,
2929
tested: false,
3030
noOfParams: 1,

0 commit comments

Comments
 (0)