Skip to content

Commit

Permalink
Replace util._extend with Object.assign
Browse files Browse the repository at this point in the history
This was never part of the public API, and has officially been
depreciated in Node 6 nodejs/node#4903
  • Loading branch information
nschonni committed Sep 7, 2016
1 parent 6dda1de commit f6b3327
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/

var path = require('path'),
util = require('util'),
clonedeep = require('lodash.clonedeep'),
errors = require('./errors'),
sass = require('./extensions');
Expand Down Expand Up @@ -289,7 +288,7 @@ module.exports.render = function(opts, cb) {

// options.error and options.success are for libsass binding
options.error = function(err) {
var payload = util._extend(new Error(), JSON.parse(err));
var payload = Object.assign(new Error(), JSON.parse(err));

if (cb) {
options.context.callback.call(options.context, payload, null);
Expand Down Expand Up @@ -437,7 +436,7 @@ module.exports.renderSync = function(opts) {
return result;
}

throw util._extend(new Error(), JSON.parse(result.error));
throw Object.assign(new Error(), JSON.parse(result.error));
};

/**
Expand Down

0 comments on commit f6b3327

Please sign in to comment.