mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Remove baseCreate.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import baseCreate from './.internal/baseCreate.js'
|
||||
|
||||
/**
|
||||
* Creates an object that inherits from the `prototype` object. If a
|
||||
* `properties` object is given, its own enumerable string keyed properties
|
||||
@@ -33,7 +31,8 @@ import baseCreate from './.internal/baseCreate.js'
|
||||
* // => true
|
||||
*/
|
||||
function create(prototype, properties) {
|
||||
const result = baseCreate(prototype)
|
||||
prototype = prototype === null ? null : Object(prototype)
|
||||
const result = Object.create(prototype)
|
||||
return properties == null ? result : Object.assign(result, properties)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user