Skip to content

Commit

Permalink
Remove use of lodash
Browse files Browse the repository at this point in the history
Lodash is a library that simply is not needed any more, and it had
a major security vulnerability to boot.  This swaps out some of what
lodash was offering since much of it is now baked into ES2015.  Lodash
itself will be removed in a future commit

Issue #15 Modernize development environment
  • Loading branch information
slifty committed Nov 15, 2018
1 parent fdbf0a2 commit 55b2f97
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/opened-captions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = (function() {
options = options || {};

// Default options
this.options = Utils._.extend({
this.options = Object.assign({
io: null,
port: 8080
}, options);
Expand Down
4 changes: 2 additions & 2 deletions lib/streams/abstract/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var AbstractStream = function(oc, options) {
options = options || {};

// Default options
this.metadata = _.extend({
this.metadata = Object.assign({
id: uuid.v4(),
description: ''
}, options);
Expand Down Expand Up @@ -107,7 +107,7 @@ AbstractStream.prototype.getBuffer = function(cursor) {
AbstractStream.prototype.trimBuffer = function() {

// Get the lowest cursor value
var cursorValues = _.values(this.cursors);
var cursorValues = Object.values(this.cursors);
var index = Math.min.apply(null, cursorValues);

// Slice off a portion (or all of) the content in the buffer
Expand Down
2 changes: 1 addition & 1 deletion lib/streams/network/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var NetworkStream = function(oc, options) {
options = options || {};

// Default options
self.options = Utils._.extend({
self.options = Object.assign({
host: 'localhost',
port: 9000
}, options);
Expand Down
4 changes: 2 additions & 2 deletions lib/streams/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var ServerStream = function(oc, options) {
options = options || {};

// Default options
self.options = Utils._.extend({
self.options = Object.assign({
host: 'localhost',
port: 80
}, options);
Expand All @@ -30,4 +30,4 @@ var ServerStream = function(oc, options) {
ServerStream.prototype = Object.create(AbstractStream.prototype);
ServerStream.prototype.constructor = ServerStream;

module.exports = ServerStream;
module.exports = ServerStream;

0 comments on commit 55b2f97

Please sign in to comment.