Skip to content

Commit 59381d0

Browse files
authoredNov 1, 2016
Merge pull request #116 from nathanhammond/object-assign
Use object-assign for Node.js 0.12 support.
2 parents 047443e + ed2d472 commit 59381d0

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed
 

‎lib/client.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import events from 'events';
2-
import WebSocket from 'faye-websocket';
1+
import events from 'events';
2+
import WebSocket from 'faye-websocket';
3+
import objectAssign from 'object-assign';
34

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

@@ -44,12 +45,12 @@ export default class Client extends events.EventEmitter {
4445
info (data) {
4546
if (data) {
4647
debug('Info', data);
47-
this.emit('info', Object.assign({}, data, { id: this.id }));
48+
this.emit('info', objectAssign({}, data, { id: this.id }));
4849
this.plugins = data.plugins;
4950
this.url = data.url;
5051
}
5152

52-
return Object.assign({}, data || {}, { id: this.id, url: this.url });
53+
return objectAssign({}, data || {}, { id: this.id, url: this.url });
5354
}
5455

5556
// Server commands

‎package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"debug": "~2.2.0",
2424
"faye-websocket": "~0.10.0",
2525
"livereload-js": "^2.2.2",
26+
"object-assign": "^4.1.0",
2627
"qs": "^6.2.0"
2728
},
2829
"devDependencies": {
@@ -37,9 +38,9 @@
3738
"express": "^4.1.1",
3839
"gaze": "^1.1.2",
3940
"mocha": "^2.3.3",
41+
"npm-watch": "^0.1.6",
4042
"standard-version": "^2.2.1",
41-
"supertest": "^1.2.0",
42-
"npm-watch": "^0.1.6"
43+
"supertest": "^1.2.0"
4344
},
4445
"author": "mklabs",
4546
"homepage": "https://github.com/mklabs/tiny-lr",

‎yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -2570,14 +2570,14 @@ oauth-sign@~0.8.1:
25702570
version "0.8.2"
25712571
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
25722572

2573+
object-assign, object-assign@^4.0.1, object-assign@^4.1.0:
2574+
version "4.1.0"
2575+
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
2576+
25732577
object-assign@^3.0.0:
25742578
version "3.0.0"
25752579
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
25762580

2577-
object-assign@^4.0.1, object-assign@^4.1.0:
2578-
version "4.1.0"
2579-
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
2580-
25812581
object.omit@^2.0.0:
25822582
version "2.0.0"
25832583
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.0.tgz#868597333d54e60662940bb458605dd6ae12fe94"

0 commit comments

Comments
 (0)
Please sign in to comment.