Skip to content

Commit

Permalink
refactor: migrate Url to ES2015 (#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
devoto13 authored and johnjbarton committed May 24, 2018
1 parent a9c61c2 commit 685f988
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions lib/url.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
// Url
// ===
//
// Url object used for tracking files in `file-list.js`
'use strict'

var Url = function (path, type) {
this.path = path
this.type = type
this.isUrl = true
}
/**
* Url object used for tracking files in `file-list.js`.
*/
class Url {
constructor (path, type) {
this.path = path
this.type = type
this.isUrl = true
}

Url.prototype.toString = function () {
return this.path
toString () {
return this.path
}
}

// PUBLIC
module.exports = Url

0 comments on commit 685f988

Please sign in to comment.