πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
Book a DemoInstallSign in
Socket

figures

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figures - npm Package Compare versions

Comparing version

to
3.2.0

60

index.d.ts

@@ -1,23 +0,2 @@

declare const figures: {
/**
Replace unicode symbols depending on the OS.
@param string - String where the Unicode symbols will be replaced with fallback symbols depending on the OS.
@returns The input with replaced fallback Unicode symbols on Windows.
@example
```
import figures = require('figures');
console.log(figures('βœ”οΈŽ check'));
// On real OSes: βœ”οΈŽ check
// On Windows: √ check
console.log(figures.tick);
// On real OSes: βœ”οΈŽ
// On Windows: √
```
*/
(string: string): string;
declare const figureSet: {
readonly tick: string;

@@ -80,4 +59,39 @@ readonly cross: string;

readonly sevenEighth: string;
};
}
type FigureSet = typeof figureSet
declare const figures: {
/**
Replace Unicode symbols depending on the OS.
@param string - String where the Unicode symbols will be replaced with fallback symbols depending on the OS.
@returns The input with replaced fallback Unicode symbols on Windows.
@example
```
import figures = require('figures');
console.log(figures('βœ”οΈŽ check'));
// On non-Windows OSes: βœ”οΈŽ check
// On Windows: √ check
console.log(figures.tick);
// On non-Windows OSes: βœ”οΈŽ
// On Windows: √
```
*/
(string: string): string;
/**
Symbols to use when not running on Windows.
*/
readonly main: FigureSet;
/**
Symbols to use when running on Windows.
*/
readonly windows: FigureSet;
} & FigureSet;
export = figures;

@@ -127,3 +127,3 @@ 'use strict';

if (platform === 'linux') {
// The main one doesn't look that good on Ubuntu
// The main one doesn't look that good on Ubuntu.
main.questionMarkPrefix = '?';

@@ -151,1 +151,3 @@ }

module.exports = Object.assign(fn, figures);
module.exports.main = main;
module.exports.windows = windows;
{
"name": "figures",
"version": "3.1.0",
"version": "3.2.0",
"description": "Unicode symbols with Windows CMD fallbacks",
"license": "MIT",
"repository": "sindresorhus/figures",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},

@@ -40,3 +41,2 @@ "engines": {

"ava": "^1.4.1",
"import-fresh": "^3.0.0",
"markdown-table": "^1.1.2",

@@ -43,0 +43,0 @@ "tsd": "^0.7.2",

@@ -11,3 +11,2 @@ # figures [![Build Status](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures)

## Install

@@ -19,3 +18,2 @@

## Usage

@@ -29,11 +27,16 @@

console.log(figures('βœ”οΈŽ check'));
// On real OSes: βœ”οΈŽ check
// On Windows: √ check
// On non-Windows OSes: βœ”οΈŽ check
// On Windows: √ check
console.log(figures.tick);
// On real OSes: βœ”οΈŽ
// On Windows: √
// On non-Windows OSes: βœ”οΈŽ
// On Windows: √
console.log(figures.main.tick);
// On all OSes: βœ”οΈŽ
console.log(figures.windows.tick);
// On all OSes: √
```
## API

@@ -53,64 +56,72 @@

### figures.main
Symbols to use when not running on Windows.
### figures.windows
Symbols to use when running on Windows.
## Figures
| Name | Real OSes | Windows |
| ------------------ | :-------: | :-----: |
| tick | βœ” | √ |
| cross | βœ– | Γ— |
| star | β˜… | * |
| square | β–‡ | β–ˆ |
| squareSmall | β—» | [ ] |
| squareSmallFilled | β—Ό | [β–ˆ] |
| play | β–Ά | β–Ί |
| circle | β—― | ( ) |
| circleFilled | β—‰ | (*) |
| circleDotted | β—Œ | ( ) |
| circleDouble | β—Ž | ( ) |
| circleCircle | β“ž | (β—‹) |
| circleCross | β“§ | (Γ—) |
| circlePipe | β’Ύ | (β”‚) |
| circleQuestionMark | ?⃝ | (?) |
| bullet | ● | * |
| dot | β€€ | . |
| line | ─ | ─ |
| ellipsis | … | ... |
| pointer | ❯ | > |
| pointerSmall | β€Ί | Β» |
| info | β„Ή | i |
| warning | ⚠ | β€Ό |
| hamburger | ☰ | ≑ |
| smiley | γ‹‘ | ☺ |
| mustache | ΰ·΄ | β”Œβ”€β” |
| heart | β™₯ | β™₯ |
| nodejs | β¬’ | ♦ |
| arrowUp | ↑ | ↑ |
| arrowDown | ↓ | ↓ |
| arrowLeft | ← | ← |
| arrowRight | β†’ | β†’ |
| radioOn | β—‰ | (*) |
| radioOff | β—― | ( ) |
| checkboxOn | β˜’ | [Γ—] |
| checkboxOff | ☐ | [ ] |
| checkboxCircleOn | β“§ | (Γ—) |
| checkboxCircleOff | β’Ύ | ( ) |
| questionMarkPrefix | ?⃝ | ? |
| oneHalf | Β½ | 1/2 |
| oneThird | β…“ | 1/3 |
| oneQuarter | ΒΌ | 1/4 |
| oneFifth | β…• | 1/5 |
| oneSixth | β…™ | 1/6 |
| oneSeventh | ⅐ | 1/7 |
| oneEighth | β…› | 1/8 |
| oneNinth | β…‘ | 1/9 |
| oneTenth | β…’ | 1/10 |
| twoThirds | β…” | 2/3 |
| twoFifths | β…– | 2/5 |
| threeQuarters | ΒΎ | 3/4 |
| threeFifths | β…— | 3/5 |
| threeEighths | β…œ | 3/8 |
| fourFifths | β…˜ | 4/5 |
| fiveSixths | β…š | 5/6 |
| fiveEighths | ⅝ | 5/8 |
| sevenEighths | β…ž | 7/8 |
| Name | Non-Windows | Windows |
| ------------------ | :---------: | :-----: |
| tick | βœ” | √ |
| cross | βœ– | Γ— |
| star | β˜… | * |
| square | β–‡ | β–ˆ |
| squareSmall | β—» | [ ] |
| squareSmallFilled | β—Ό | [β–ˆ] |
| play | β–Ά | β–Ί |
| circle | β—― | ( ) |
| circleFilled | β—‰ | (*) |
| circleDotted | β—Œ | ( ) |
| circleDouble | β—Ž | ( ) |
| circleCircle | β“ž | (β—‹) |
| circleCross | β“§ | (Γ—) |
| circlePipe | β’Ύ | (β”‚) |
| circleQuestionMark | ?⃝ | (?) |
| bullet | ● | * |
| dot | β€€ | . |
| line | ─ | ─ |
| ellipsis | … | ... |
| pointer | ❯ | > |
| pointerSmall | β€Ί | Β» |
| info | β„Ή | i |
| warning | ⚠ | β€Ό |
| hamburger | ☰ | ≑ |
| smiley | γ‹‘ | ☺ |
| mustache | ΰ·΄ | β”Œβ”€β” |
| heart | β™₯ | β™₯ |
| nodejs | β¬’ | ♦ |
| arrowUp | ↑ | ↑ |
| arrowDown | ↓ | ↓ |
| arrowLeft | ← | ← |
| arrowRight | β†’ | β†’ |
| radioOn | β—‰ | (*) |
| radioOff | β—― | ( ) |
| checkboxOn | β˜’ | [Γ—] |
| checkboxOff | ☐ | [ ] |
| checkboxCircleOn | β“§ | (Γ—) |
| checkboxCircleOff | β’Ύ | ( ) |
| questionMarkPrefix | ?⃝ | ? |
| oneHalf | Β½ | 1/2 |
| oneThird | β…“ | 1/3 |
| oneQuarter | ΒΌ | 1/4 |
| oneFifth | β…• | 1/5 |
| oneSixth | β…™ | 1/6 |
| oneSeventh | ⅐ | 1/7 |
| oneEighth | β…› | 1/8 |
| oneNinth | β…‘ | 1/9 |
| oneTenth | β…’ | 1/10 |
| twoThirds | β…” | 2/3 |
| twoFifths | β…– | 2/5 |
| threeQuarters | ΒΎ | 3/4 |
| threeFifths | β…— | 3/5 |
| threeEighths | β…œ | 3/8 |
| fourFifths | β…˜ | 4/5 |
| fiveSixths | β…š | 5/6 |
| fiveEighths | ⅝ | 5/8 |
| sevenEighths | β…ž | 7/8 |

@@ -122,3 +133,2 @@

---

@@ -125,0 +135,0 @@

Sorry, the diff of this file is not supported yet