Skip to content

Commit

Permalink
fix types file
Browse files Browse the repository at this point in the history
  • Loading branch information
bumblehead committed Sep 11, 2023
1 parent 97243f1 commit facddb6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 6.1.3 - 2023-09-11

* [fix types file](https://github.com/iambumblehead/form-urlencoded/pull/51)


## 6.1.2 - 2023-09-10

* [fix sytax error at README](https://github.com/iambumblehead/form-urlencoded/pull/50)
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import formurlencoded from 'form-urlencoded'
// var formurlencoded = require('form-urlencoded')

const obj = {
str : 'val',
num : 0,
arr : [3, {prop : false}, 1, null, 6],
obj : {prop1 : null, prop2 : ['elem']}
str: 'val',
num: 0,
arr: [3, {prop: false}, 1, null, 6],
obj: {prop1: null, prop2: ['elem']}
}

console.log(formurlencoded(obj))
Expand All @@ -24,19 +24,19 @@ console.log(formurlencoded(obj))
// 1%5D=null&obj%5Bprop2%5D%5B0%5D=elem

console.log(formurlencoded(obj, {
ignorenull : true,
skipIndex : true,
sorted : true
ignorenull: true,
skipIndex: true,
sorted: true
}))
// arr%5B%5D=3&arr%5B%5D%5Bprop%5D=false&arr%5B%5D=1&arr
// %5B%5D=6&num=0&obj%5Bprop2%5D%5B%5D=elem&str=val

console.log(formurlencoded(obj, {
ignoreEmptyArray: true,
ignorenull : true,
useDot : true,
skipIndex : true,
skipBracket : true
ignorenull: true,
useDot: true,
skipIndex: true,
skipBracket: true
}))
// str=val&num=0&arr=3&arr.prop=false&arr=1&arr=6&obj.pr
// op2=elem
Expand Down
2 changes: 1 addition & 1 deletion form-urlencoded.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare namespace formUrlEncoded {
sorted?: boolean;
skipIndex?: boolean;
ignorenull?: boolean;
ignoreEmptyArrays?: boolean;
ignoreEmptyArray?: boolean;
skipBracket?: boolean,
useDot?: boolean
whitespace?: string
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": "./form-urlencoded.js",
"import": "./form-urlencoded.mjs"
},
"version": "6.1.2",
"version": "6.1.3",
"description": "Return an object as an 'x-www-form-urlencoded' string",
"author": "Chris <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit facddb6

Please sign in to comment.