Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions src/samples/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const TEMPLATE = `> A general sample that uses a range of features
{{country}}
{{/clause}}

- You are *{{age}}* years old

- {{% if (data.age) { return 'You are ' + data.age + ' years old'; } else { return 'Age not provided'; } %}}
- Your monthly salary is {{salary as "0,0.00 CCC"}}
- Your favorite colours are {{#join favoriteColors}}

Expand All @@ -59,41 +60,40 @@ Thank you.
`;

const DATA = {
"$class" : "[email protected]",
"name": "John Doe",
"address" : {
"line1" : "1 Main Street",
"city" : "Boson",
"state" : "MA",
"country" : "USA"
},
"age" : 42,
"salary": {
"$class": "[email protected]",
"doubleValue": 1500,
"currencyCode": "EUR"
},
"favoriteColors" : ['red', 'green', 'blue'],
"order" : {
"createdAt" : "2023-05-01",
"$class" : "[email protected]",
"orderLines":
[
{
"$class" : "[email protected]",
"sku" : "ABC-123",
"quantity" : 3,
"price" : 29.99
},
{
"$class" : "[email protected]",
"sku" : "DEF-456",
"quantity" : 5,
"price" : 19.99
}
]
}
$class: "[email protected]",
name: "John Doe",
address: {
line1: "1 Main Street",
city: "Boson",
state: "MA",
country: "USA",
},
age: 42,
salary: {
$class: "[email protected]",
doubleValue: 1500,
currencyCode: "EUR",
},
favoriteColors: ["red", "green", "blue"],
order: {
createdAt: "2023-05-01",
$class: "[email protected]",
orderLines: [
{
$class: "[email protected]",
sku: "ABC-123",
quantity: 3,
price: 29.99,
},
{
$class: "[email protected]",
sku: "DEF-456",
quantity: 5,
price: 19.99,
},
],
},
};

const NAME = 'Customer Order';
export {NAME, MODEL,DATA,TEMPLATE};
const NAME = "Customer Order";
export { NAME, MODEL, DATA, TEMPLATE };