Skip to content

Commit

Permalink
Use object-assign for Node.js 0.12 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Nov 1, 2016
1 parent 047443e commit ed2d472
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
9 changes: 5 additions & 4 deletions lib/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import events from 'events';
import WebSocket from 'faye-websocket';
import events from 'events';
import WebSocket from 'faye-websocket';
import objectAssign from 'object-assign';

const debug = require('debug')('tinylr:client');

Expand Down Expand Up @@ -44,12 +45,12 @@ export default class Client extends events.EventEmitter {
info (data) {
if (data) {
debug('Info', data);
this.emit('info', Object.assign({}, data, { id: this.id }));
this.emit('info', objectAssign({}, data, { id: this.id }));
this.plugins = data.plugins;
this.url = data.url;
}

return Object.assign({}, data || {}, { id: this.id, url: this.url });
return objectAssign({}, data || {}, { id: this.id, url: this.url });
}

// Server commands
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"debug": "~2.2.0",
"faye-websocket": "~0.10.0",
"livereload-js": "^2.2.2",
"object-assign": "^4.1.0",
"qs": "^6.2.0"
},
"devDependencies": {
Expand All @@ -37,9 +38,9 @@
"express": "^4.1.1",
"gaze": "^1.1.2",
"mocha": "^2.3.3",
"npm-watch": "^0.1.6",
"standard-version": "^2.2.1",
"supertest": "^1.2.0",
"npm-watch": "^0.1.6"
"supertest": "^1.2.0"
},
"author": "mklabs",
"homepage": "https://github.com/mklabs/tiny-lr",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2570,14 +2570,14 @@ oauth-sign@~0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"

object-assign, object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"

object-assign@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"

object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"

object.omit@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.0.tgz#868597333d54e60662940bb458605dd6ae12fe94"
Expand Down

0 comments on commit ed2d472

Please sign in to comment.