bitovi / bitovi/canjs.com

can.util: can.deparam could be a little more specific

Open
#101 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17
Forks
12
PR merge metrics
No merged PRs in 30d

Description

can.deparam says it converts strings of key value pairs. Perhaps it would be helpful to at least have the term `application/x-www-form-urlencoded` in there, since that's the name of that format that I know. It might also be helpful to have a code snippet that shows how to convert an object -to- `form-urlencoded`. I would also think it's worth mentioning where it most often seems to be used: model constructors. A short example code could be:

``` js
var person = new Person(can.deparam($("form#person").serialize());
```

Contributor guide

Open the contributing guide

Research direction

Find the documentation for can.deparam and review its current description and examples. Update it to identify application/x-www-form-urlencoded, explain object-to-form-urlencoded conversion, and mention model constructors with the proposed form example; done when those points are documented accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.