diff --git a/git-host.js b/git-host.js index 740952e..f7af772 100644 --- a/git-host.js +++ b/git-host.js @@ -1,5 +1,6 @@ 'use strict' var gitHosts = require('./git-host-info.js') +var extend = Object.assign || require('util')._extend var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { var gitHostInfo = this @@ -22,9 +23,9 @@ GitHost.prototype.hash = function () { GitHost.prototype._fill = function (template, opts) { if (!template) return - var vars = Object.assign({}, opts) + var vars = extend({}, opts) vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : '' - opts = Object.assign({}, this.opts, opts) + opts = extend(extend({}, this.opts), opts) var self = this Object.keys(this).forEach(function (key) { if (self[key] != null && vars[key] == null) vars[key] = self[key] @@ -117,7 +118,7 @@ GitHost.prototype.tarball = function (opts) { } GitHost.prototype.file = function (P, opts) { - return this._fill(this.filetemplate, Object.assign({ path: P }, opts)) + return this._fill(this.filetemplate, extend({ path: P }, opts)) } GitHost.prototype.getDefaultRepresentation = function () { diff --git a/package.json b/package.json index 7245811..80384a1 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,6 @@ "bitbucket", "gitlab" ], - "engines": { - "node": ">=4" - }, "author": "Rebecca Turner (http://re-becca.org)", "license": "ISC", "bugs": {