Move internal modules to “internal” folder.

This commit is contained in:
John-David Dalton
2017-01-10 00:44:25 -08:00
parent 2b05673125
commit 26ea38dcf4
500 changed files with 726 additions and 726 deletions

30
.internal/baseCreate.js Normal file
View File

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