Socket
Socket
Sign inDemoInstall

radio-symbol

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

31

index.js
'use strict';
var green = require('ansi-green');
var gray = require('ansi-gray');

@@ -7,17 +8,35 @@ var win = process.platform === 'win32';

module.exports = {
on: win ? '(*)' : '◉',
on: green(win ? '(*)' : '◉'),
off: win ? '( )' : '◯',
disabled: win ? '(x)' : 'ⓧ'
disabled: gray(win ? '(x)' : 'ⓧ')
};
module.exports.star = {
on: green('★'),
off: '☆',
on: '★',
disabled: '☆'
disabled: gray('☆')
};
module.exports.ballot = {
on: green('☑'),
off: '☐',
on: '☑',
disabled: '☒'
disabled: gray('☒')
};
module.exports.nocolor = {
on: win ? '(*)' : '◉',
off: win ? '( )' : '◯',
disabled: win ? '(x)' : 'ⓧ',
star: {
on: green('★'),
off: '☆',
disabled: gray('☆')
},
ballot: {
on: green('☑'),
off: '☐',
disabled: gray('☒')
}
};

5

package.json
{
"name": "radio-symbol",
"description": "Unicode radio button symbol, for toggling on/off in prompts.",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/enquirer/radio-symbol",

@@ -25,3 +25,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"ansi-gray": "^0.1.1"
"ansi-gray": "^0.1.1",
"ansi-green": "^0.1.1"
},

@@ -28,0 +29,0 @@ "devDependencies": {

@@ -32,2 +32,11 @@ # radio-symbol [![NPM version](https://img.shields.io/npm/v/radio-symbol.svg?style=flat)](https://www.npmjs.com/package/radio-symbol) [![NPM downloads](https://img.shields.io/npm/dm/radio-symbol.svg?style=flat)](https://npmjs.org/package/radio-symbol)

* All of the `on` states are styled using ansi green.
* All of the `disabled` states are styled using ansi gray.
For unstyled states, use:
```js
var radio = require('radio-symbol').nocolor;
```
### Circle symbol

@@ -34,0 +43,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc