mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 00:37:33 -04:00
24 lines
400 B
JavaScript
24 lines
400 B
JavaScript
|
/**
|
||
|
* This method returns a new empty object.
|
||
|
*
|
||
|
* @static
|
||
|
* @memberOf _
|
||
|
* @since 4.13.0
|
||
|
* @category Util
|
||
|
* @returns {Object} Returns the new empty object.
|
||
|
* @example
|
||
|
*
|
||
|
* var objects = _.times(2, _.stubObject);
|
||
|
*
|
||
|
* console.log(objects);
|
||
|
* // => [{}, {}]
|
||
|
*
|
||
|
* console.log(objects[0] === objects[1]);
|
||
|
* // => false
|
||
|
*/
|
||
|
function stubObject() {
|
||
|
return {};
|
||
|
}
|
||
|
|
||
|
module.exports = stubObject;
|