2.0.1
Update
- Fix arguments passing in constructor allowing to set the options arguments for form-data fields given to constructor
import {createReadStream, statSync} from "fs"
import FormData from "formdata-node"
const fd = new FormData([
{
name: "file",
value: createReadStream("/path/to/file"),
// Here you can set field's options
options: {
size: statSync("/path/to/file").size
}
}
])Remove
@octetstream/invariantis not necessary for this package anymore so I did removed it from dependencies
All changes: v2.0.0...v2.0.1