If you set colors , you will see that you can write scripts as follows:
var colors = require('colors');
console.log('hello'.green);
console.log('i like cake and pies'.underline.red)
console.log('inverse the color'.inverse);
console.log('OMG Rainbows!'.rainbow);
console.log('Run the trap'.trap);
How is it possible that properties behave like functions (e.g. [5, 6, 4].count?).
I understand 'Run the trap'.trap(), but not'Run the trap'.trap
source
share