27 lines
565 B
JavaScript
27 lines
565 B
JavaScript
/**
|
|
* @file Constructors cached from literals.
|
|
* @version 1.0.0
|
|
* @author Xotic750 <Xotic750@gmail.com>
|
|
* @copyright Xotic750
|
|
* @license {@link <https://opensource.org/licenses/MIT> MIT}
|
|
* @module cached-constructors-x
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
/**
|
|
* Constructors cached from literals.
|
|
*
|
|
* @type Object
|
|
* @example
|
|
* var constructors = require('cached-constructors-x');
|
|
*/
|
|
module.exports = {
|
|
Array: [].constructor,
|
|
Boolean: true.constructor,
|
|
Number: (0).constructor,
|
|
Object: {}.constructor,
|
|
RegExp: (/(?:)/).constructor,
|
|
String: ''.constructor
|
|
};
|