figures
Advanced tools
Comparing version 1.7.0 to 2.0.0
18
index.js
'use strict'; | ||
var objectAssign = require('object-assign'); | ||
var escapeStringRegexp = require('escape-string-regexp'); | ||
var platform = process.platform; | ||
const escapeStringRegexp = require('escape-string-regexp'); | ||
var main = { | ||
const platform = process.platform; | ||
const main = { | ||
tick: '✔', | ||
@@ -65,3 +65,3 @@ cross: '✖', | ||
var win = { | ||
const win = { | ||
tick: '√', | ||
@@ -130,5 +130,5 @@ cross: '×', | ||
var figures = platform === 'win32' ? win : main; | ||
const figures = platform === 'win32' ? win : main; | ||
var fn = function (str) { | ||
const fn = str => { | ||
if (figures === main) { | ||
@@ -138,3 +138,3 @@ return str; | ||
Object.keys(main).forEach(function (key) { | ||
Object.keys(main).forEach(key => { | ||
if (main[key] === figures[key]) { | ||
@@ -150,2 +150,2 @@ return; | ||
module.exports = objectAssign(fn, figures); | ||
module.exports = Object.assign(fn, figures); |
{ | ||
"name": "figures", | ||
"version": "1.7.0", | ||
"version": "2.0.0", | ||
"description": "Unicode symbols with Windows CMD fallbacks", | ||
@@ -13,3 +13,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=4" | ||
}, | ||
@@ -37,11 +37,13 @@ "scripts": { | ||
"dependencies": { | ||
"escape-string-regexp": "^1.0.5", | ||
"object-assign": "^4.1.0" | ||
"escape-string-regexp": "^1.0.5" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"markdown-table": "^0.4.0", | ||
"markdown-table": "^1.0.0", | ||
"require-uncached": "^1.0.2", | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
} |
@@ -113,4 +113,9 @@ # figures [![Build Status: Linux](https://travis-ci.org/sindresorhus/figures.svg?branch=master)](https://travis-ci.org/sindresorhus/figures) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/mb743hl70269be3r/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/figures/branch/master) | ||
## Related | ||
- [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
8894
1
121
137
- Removedobject-assign@^4.1.0
- Removedobject-assign@4.1.1(transitive)