Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
num?: number;
obj?: object;
}
/**************
* Public API *
**************/
parse({});
parse([]);
parse({}, {});
new Parser();
const parser: Parser = new Parser({});
s = parser.parse({ str: '', num: 1, obj: {} });
parser.parse([]);
const transform: Transform = new Transform({ quote: '' });
const nodeTransform: NodeTransform = transform;
// Tests using examples from Readme
interface Car {
car: string;
price: number;
}
const opts: json2csv.Options = {
fields: [
// Supports pathname -> pathvalue
'simplepath', // equivalent to {value:'simplepath'}
'path.to.value', // also equivalent to {value:'path.to.value'}
// Supports label -> simple path
{