Skip to content

Named parameters and Typescript

Compare
Choose a tag to compare
@coston coston released this 13 Sep 22:44
· 53 commits to master since this release

Description

Thanks to @dnim for updating the lib to TS and refactoring the function to take named parameters for a simpler developer experience when working when specifying customized behavior.

Breaking Changes

  • Named parameters are now required for passing custom data, filename, and delimeter props.
  • Support for the IE navigator.msSaveBlob method was removed from the code (as it was removed in new versions of TypeScript).
  • File name can be provided without .csv extension, it will be added automatically

Migration Steps

  • update to the new version (2.x)
  • map arguments on object props. I.e:
const props = {
  data: data,
  filename: filename,
  delimiter: delimiter
}
csvDownload(props);

Full list of changes:

  • chore: bump version e163536
  • chore: update lockfile and format code c79d692
  • refactor!: update the lib to TS and require named parameters (#30) 4e1a392
  • chore(deps): bump ajv from 6.5.4 to 6.12.6 (#33) 62f99a8
  • chore(deps): bump chownr and chownr (#32) 35e8419

v1.1.2...v2.0.0