Skip to content

Commit

Permalink
Add nodejs figure
Browse files Browse the repository at this point in the history
  • Loading branch information
lmariscal committed Oct 27, 2019
1 parent 556116b commit f2f7487
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Windows CMD only supports a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).

All checks are runned at compile time, if you need a run time solution please
All checks run at compile time, if you need a run time solution please
let me know and will consider adding support for it.

The new windows terminal and integrated VsCode terminal fully support Unicode
Expand All @@ -28,11 +28,11 @@ $ nimble install figures
See the [source](src/figures.nim) for supported symbols.

To use unicode in windows you must change the codepage. By default it sets up
chcp on startup, to disable this functionaly and manually set it up define
chcp on startup, to disable this functionality and manually set it up define
```nochcp```.

```nim
import figures
from figures import nil
echo(figures.tick & " done")
// Other OSes: ✔︎ done
Expand Down
4 changes: 2 additions & 2 deletions figures.nimble
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Package

version = "1.1.0"
version = "1.2.0"
author = "Leonardo Mariscal"
description = "Unicode symbols with Windows CMD fallbacks "
license = "MIT"
srcDir = "src"

# Dependencies

requires "nim >= 0.20.0"
requires "nim >= 1.0.0"
2 changes: 2 additions & 0 deletions src/figures.nim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ when terminalSupportUnicode():
smiley* = ""
mustache* = ""
heart* = ""
nodejs* = ""
arrowUp* = ""
arrowDown* = ""
arrowLeft* = ""
Expand Down Expand Up @@ -114,6 +115,7 @@ else:
smiley* = ""
mustache* = "┌─┐"
heart* = ""
nodejs* = ""
arrowUp* = ""
arrowDown* = ""
arrowLeft* = ""
Expand Down
1 change: 1 addition & 0 deletions tests/test.nim
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ echo "hamburger " & figures.hamburger
echo "smiley " & figures.smiley
echo "mustache " & figures.mustache
echo "heart " & figures.heart
echo "nodejs " & figures.nodejs
echo "arrowUp " & figures.arrowUp
echo "arrowDown " & figures.arrowDown
echo "arrowLeft " & figures.arrowLeft
Expand Down

0 comments on commit f2f7487

Please sign in to comment.