OData Pretty Print
Pretty print OData Request-URLs.
Install
Install from the NPM repository using yarn or npm:
yarn add odata-pretty-print
npm install odata-pretty-print
Example Usage
import { format, print } from 'odata-pretty-print';
//...
const url =
'$expand=field1($expand=field2($expand=field3;$select=a,b,c);$select=d,e,f)';
const formattedString = format(url);
// OR:
print(url);
Will output something like this
$expand=field1(
$expand=field2(
$expand=field3;
$select=a,b,c
);
$select=d,e,f
)