// The default options. No need to pass anything in if you like these constopts = { arrayLength:10, // maximum size of arrays and objects cborSafe:false, // generate only CBOR-safe types? depth:5, // How deep to go jsonSafe:false, // generate only JSON-safe types? noBoxed:false, // ignore boxed types, like String? output:false, // add custom inspect functions that make output parseable JS? scripts: [], // Array of script names to limit output to. Defaults to all stringLength:20, // Maximum string and Buffer length, in codepoints types: {}, // Extra types to generate. Pass in `{Date: null}` to not generate Dates } constb = newBasura(opts) console.log(b.generate()) // output: ??? console.log(b.generate_Date()) // output: some date
+
import {Basura} from'basura'
// The default options. No need to pass anything in if you like these constopts = { arrayLength:10, // maximum size of arrays and objects cborSafe:false, // generate only CBOR-safe types? depth:5, // How deep to go jsonSafe:false, // generate only JSON-safe types? noBoxed:false, // ignore boxed types, like String? output:false, // add custom inspect functions that make output parseable JS? scripts: [], // Array of script names to limit output to. Defaults to all stringLength:20, // Maximum string and Buffer length, in codepoints types: {}, // Extra types to generate. Pass in `{Date: null}` to not generate Dates } constb = newBasura(opts) console.log(b.generate()) // output: ??? console.log(b.generate_Date()) // output: some date