Skip to content

3.0.0

Choose a tag to compare

@43081j 43081j released this 11 Nov 15:15
· 4 commits to main since this release
12c2efc

Breaking change (3.0.0)

This release adds a new option: allowSparseArrays which defaults to false.

If true, arrays parsed with gaps in their indices will be kept as sparse arrays. By default (false), they will be truncated at the first missing index.

For example:

parse('foo[0]=1&foo[2]=3', { nestingSyntax: 'index', allowSparseArrays: true })
// => { foo: [ 1, <1 empty item>, 3 ] }
parse('foo[0]=1&foo[2]=3', { nestingSyntax: 'index', allowSparseArrays: false })
// => { foo: [ 1 ] }

Note that this only applies when parsing.

What's Changed

  • docs: update README because of require(esm) by @wojtekmaj in #59
  • fix: only consider first key when value exists by @43081j in #61
  • chore: enable dependabot by @43081j in #62
  • chore(deps): bump the github-actions group with 2 updates by @dependabot[bot] in #63
  • chore(deps-dev): bump the development-dependencies group with 3 updates by @dependabot[bot] in #64
  • chore(deps-dev): bump the development-dependencies group across 1 directory with 7 updates by @dependabot[bot] in #66
  • chore(deps-dev): bump the development-dependencies group with 6 updates by @dependabot[bot] in #67
  • chore: enable trusted publishing by @43081j in #68
  • chore(deps-dev): bump the development-dependencies group with 5 updates by @dependabot[bot] in #69
  • chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 in the github-actions group by @dependabot[bot] in #70
  • chore(deps): bump actions/checkout from 6.0.3 to 7.0.0 in the github-actions group by @dependabot[bot] in #71
  • chore(deps-dev): bump the development-dependencies group with 4 updates by @dependabot[bot] in #72
  • chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0 in the github-actions group by @dependabot[bot] in #73
  • chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 in the github-actions group by @dependabot[bot] in #74
  • chore(deps-dev): bump the development-dependencies group with 6 updates by @dependabot[bot] in #75
  • chore(deps-dev): bump the development-dependencies group with 4 updates by @dependabot[bot] in #76
  • chore(deps-dev): bump the development-dependencies group with 5 updates by @dependabot[bot] in #77
  • chore(deps): bump actions/setup-node from 7.0.0 to 7.1.0 in the github-actions group by @dependabot[bot] in #78
  • chore(deps-dev): bump the development-dependencies group with 5 updates by @dependabot[bot] in #79
  • feat: add allowSparseArrays by @43081j in #80

New Contributors

Full Changelog: 2.5.0...3.0.0