@nlighten/json-transform-core
Version:
Core types and utilities for handling JSON transformers
45 lines (44 loc) • 1.19 kB
JSON
[
{
"name": "inline - remove leading and trailing spaces",
"given": {
"input": " hello ",
"definition": "$$trim:$"
},
"expect": {
"equal": "hello"
}
},
{
"name": "inline - remove leading spaces",
"given": {
"input": " hello ",
"definition": "$$trim(START):$"
},
"expect": {
"equal": "hello "
}
},
{
"name": "inline - remove trailing spaces",
"given": {
"input": " hello ",
"definition": "$$trim(END):$"
},
"expect": {
"equal": " hello"
}
},
{
"name": "inline - remove indentation",
"given": {
"input": " <html> \n <body> \n <p>Hello, world</p> \n </body> \n </html>",
"inputFormat": "xml",
"definition": "$$trim(INDENT):$"
},
"expect": {
"equal": "<html>\n <body>\n <p>Hello, world</p>\n </body>\n</html>",
"format": "xml"
}
}
]