Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@testing-library/react": "^14.2.1",
"@types/node": "^20.11.19",
"eslint": "^8.56.0",
"globals": "^14.0.0",
"jsdoc": "^4.0.2",
"jsdom": "^24.0.0",
"typescript": "^5.2.2",
Expand All @@ -32,8 +33,6 @@
"@xmldom/xmldom": "^0.8.0",
"cbor-js": "^0.1.0",
"eventemitter3": "^5.0.1",
"globals": "^14.0.0",
"object-assign": "^4.0.0",
"pngparse": "^2.0.0",
"ws": "^8.0.0"
},
Expand Down
4 changes: 1 addition & 3 deletions src/core/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* @author Brandon Alexander - baalexander@gmail.com
*/

import assign from 'object-assign';

/**
* Message objects are used for publishing and subscribing to and from topics.
*
Expand All @@ -16,6 +14,6 @@ export default class Message {
* @param {T} [values={}] - An object matching the fields defined in the .msg definition file.
*/
constructor(values) {
assign(this, values || {});
Object.assign(this, values || {});
}
}
5 changes: 2 additions & 3 deletions src/core/Ros.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import socketAdapter from './SocketAdapter.js';

import assign from 'object-assign';
import Topic from './Topic.js';
import Service from './Service.js';
import Param from './Param.js';
Expand Down Expand Up @@ -64,7 +63,7 @@ export default class Ros extends EventEmitter {
*/
connect(url) {
if (this.transportLibrary.constructor.name === 'RTCPeerConnection') {
this.socket = assign(
this.socket = Object.assign(
// @ts-expect-error -- this is kinda wild. `this.transportLibrary` can either be a string or an RTCDataChannel. This needs fixing.
this.transportLibrary.createDataChannel(url, this.transportOptions),
socketAdapter(this)
Expand All @@ -74,7 +73,7 @@ export default class Ros extends EventEmitter {
// Detect if in browser vs in NodeJS
var sock = typeof window !== 'undefined' ? new window.WebSocket(url) : new WebSocket(url);
sock.binaryType = 'arraybuffer';
this.socket = assign(sock, socketAdapter(this));
this.socket = Object.assign(sock, socketAdapter(this));
}
} else {
throw 'Unknown transportLibrary: ' + this.transportLibrary.toString();
Expand Down
4 changes: 1 addition & 3 deletions src/urdf/UrdfMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export default class UrdfMaterial {
return this.color === null && this.textureFilename === null;
}
assign(obj) {
return assign(this, obj);
return Object.assign(this, obj);
}
}

import assign from 'object-assign';