Skip to content

Commit

Permalink
feat(hydrate): use empty string as default value
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed Mar 5, 2016
1 parent c4cd458 commit 3c9f0ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ value should have the following format
*/

// borrow from superagent
function trim (s) {
function trim (s = '') {
return ''.trim ? s.trim(s) : s.replace(/(^\s*|\s*$)/g, '')
}

// borrow from superagent
function parseHeader (str) {
function parseHeader (str = '') {
var lines = str.split(/\r?\n/)
var fields = {}
var index
Expand Down

0 comments on commit 3c9f0ac

Please sign in to comment.