Skip to content

Commit

Permalink
Require Node.js 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 17, 2019
1 parent 95dd491 commit e1542f5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ language: node_js
node_js:
- '10'
- '8'
- '6'
24 changes: 14 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
/**
Colored symbols for various log levels.
Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
@example
```
import logSymbols = require('log-symbols');
console.log(logSymbols.success, 'Finished successfully!');
// On good OSes: ✔ Finished successfully!
// On Windows: √ Finished successfully!
```
*/
declare const logSymbols: {
readonly info: string;

/**
@example
```
import logSymbols = require('log-symbols');
console.log(logSymbols.success, 'Finished successfully!');
// On good OSes: ✔ Finished successfully!
// On Windows: √ Finished successfully!
```
*/
readonly success: string;

readonly warning: string;
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "log-symbols",
"version": "2.2.0",
"description": "Colored symbols for various log levels. Example: ✔︎ Success",
"description": "Colored symbols for various log levels. Example: `✔︎ Success`",
"license": "MIT",
"repository": "sindresorhus/log-symbols",
"author": {
Expand All @@ -10,7 +10,7 @@
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
Expand All @@ -26,13 +26,11 @@
"cmd",
"command-line",
"characters",
"char",
"symbol",
"symbols",
"figure",
"figures",
"fallback",
"win",
"windows",
"log",
"logging",
Expand Down
5 changes: 2 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import test from 'ava';
import stripAnsi from 'strip-ansi';
import logSymbols from '.';

// TODO: Use `Object.entries` when targeting Node.js 8
for (const key of Object.keys(logSymbols)) {
console.log(logSymbols[key], key);
for (const [key, value] of Object.entries(logSymbols)) {
console.log(value, key);
}

console.log('');
Expand Down

0 comments on commit e1542f5

Please sign in to comment.