Use more ES2015.

This commit is contained in:
John-David Dalton
2017-01-02 16:45:31 -06:00
parent 2900cfd288
commit 1a1e462f80
17 changed files with 45 additions and 59 deletions

View File

@@ -1,7 +1,7 @@
import isObject from './isObject.js';
/** Built-in value references. */
var objectCreate = Object.create;
const objectCreate = Object.create;
/**
* The base implementation of `_.create` without support for assigning
@@ -11,9 +11,9 @@ var objectCreate = Object.create;
* @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
var baseCreate = (function() {
const baseCreate = (() => {
function object() {}
return function(proto) {
return proto => {
if (!isObject(proto)) {
return {};
}
@@ -25,6 +25,6 @@ var baseCreate = (function() {
object.prototype = undefined;
return result;
};
}());
})();
export default baseCreate;