You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 8, 2020. It is now read-only.
feat(result): values of default params to be always strings (#121)
Changes in [Result object](https://github.com/tunnckoCore/parse-function#result)!
**Possible breaking change, if you depend on values of `result.defaults`!**
Now `result.defaults` is key/value pairs as before, but the value is always of type `string` or `undefined`!
Casting of values is delegated to the end user which before was not consistent and was actual value of the default parameter.
Example **(before)**:
```js
const result = app.parse('(a = 123) => {}')
console.log(result.defaults)
// => { a: 123 }
```
Example **(after)**:
```js
const result = app.parse('(a = 123) => {}')
// notice that `123` now is string!
console.log(result.defaults)
// => { a: '123' }
```
fixes#120, related #110
0 commit comments