using slice from the array prototype without instantiating a new array on every invocation
This commit is contained in:
parent
90e2260f58
commit
08cfbade29
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
|
@ -29,7 +29,7 @@ function init() {
|
||||||
ret[name] = {
|
ret[name] = {
|
||||||
get: function () {
|
get: function () {
|
||||||
var obj = defineProps(function self() {
|
var obj = defineProps(function self() {
|
||||||
var str = [].slice.call(arguments).join(' ');
|
var str = Array.prototype.slice.call(arguments).join(' ');
|
||||||
|
|
||||||
if (!chalk.enabled) {
|
if (!chalk.enabled) {
|
||||||
return str;
|
return str;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue