Skip to content

Commit

Permalink
[Refactor] format: remove util.assign call
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 13, 2021
1 parent 01aaffd commit 9c60d53
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions lib/formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@
var replace = String.prototype.replace;
var percentTwenties = /%20/g;

var util = require('./utils');

var Format = {
RFC1738: 'RFC1738',
RFC3986: 'RFC3986'
};

module.exports = util.assign(
{
'default': Format.RFC3986,
formatters: {
RFC1738: function (value) {
return replace.call(value, percentTwenties, '+');
},
RFC3986: function (value) {
return String(value);
}
module.exports = {
'default': Format.RFC3986,
formatters: {
RFC1738: function (value) {
return replace.call(value, percentTwenties, '+');
},
RFC3986: function (value) {
return String(value);
}
},
Format
);
RFC1738: Format.RFC1738,
RFC3986: Format.RFC3986
};

0 comments on commit 9c60d53

Please sign in to comment.