pointer-symbol
Version:
Cross-platform pointer symbols for prompts.
21 lines (18 loc) • 423 B
JavaScript
;
module.exports = function(options) {
if (options && typeof options.pointer === 'string') {
return options.pointer.trim();
}
var small = options && options.small;
switch (process.platform) {
case 'cygwin':
case 'msys':
case 'win32':
return small ? '»' : '>';
case 'linux':
return small ? '‣' : '‣';
default: {
return small ? '›' : '❯';
}
}
};