Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

log-symbols

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log-symbols - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

browser.js

30

index.js
'use strict';
var chalk = require('chalk');
const os = require('os');
const chalk = require('chalk');
var main = {
const isSupported = (() => {
if (process.platform !== 'win32' || process.env.CI) {
return true;
}
if (process.env.ConEmuDir) {
return false;
}
// Windows 10
const osRelease = os.release().split('.');
if (
Number(osRelease[0]) >= 10 &&
Number(osRelease[2]) >= 10586
) {
return true;
}
return false;
})();
const main = {
info: chalk.blue('ℹ'),

@@ -11,3 +33,3 @@ success: chalk.green('✔'),

var win = {
const fallbacks = {
info: chalk.blue('i'),

@@ -19,2 +41,2 @@ success: chalk.green('√'),

module.exports = process.platform === 'win32' ? win : main;
module.exports = isSupported ? main : fallbacks;

92

package.json
{
"name": "log-symbols",
"version": "1.0.2",
"description": "Colored symbols for various log levels. Example: ✔︎ success",
"license": "MIT",
"repository": "sindresorhus/log-symbols",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "node test.js"
},
"files": [
"index.js"
],
"keywords": [
"unicode",
"cli",
"cmd",
"command-line",
"characters",
"char",
"symbol",
"symbols",
"figure",
"figures",
"fallback",
"win",
"windows",
"log",
"logging",
"terminal",
"stdout"
],
"dependencies": {
"chalk": "^1.0.0"
},
"devDependencies": {
"ava": "0.0.4"
}
"name": "log-symbols",
"version": "2.0.0",
"description": "Colored symbols for various log levels. Example: ✔︎ Success",
"license": "MIT",
"repository": "sindresorhus/log-symbols",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js",
"browser.js"
],
"keywords": [
"unicode",
"cli",
"cmd",
"command-line",
"characters",
"char",
"symbol",
"symbols",
"figure",
"figures",
"fallback",
"win",
"windows",
"log",
"logging",
"terminal",
"stdout"
],
"dependencies": {
"chalk": "^2.0.1"
},
"devDependencies": {
"ava": "*",
"strip-ansi": "^4.0.0",
"xo": "*"
},
"browser": "browser.js"
}
# log-symbols [![Build Status](https://travis-ci.org/sindresorhus/log-symbols.svg?branch=master)](https://travis-ci.org/sindresorhus/log-symbols)
<img src="screenshot.png" width="226" align="right">
> Colored symbols for various log levels
Includes fallbacks for Windows CMD which only supports a [limited character set](http://en.wikipedia.org/wiki/Code_page_437).
Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
![](screenshot.png)
## Install
```sh
$ npm install --save log-symbols
```
$ npm install log-symbols
```

@@ -20,7 +20,7 @@

```js
var logSymbols = require('log-symbols');
const logSymbols = require('log-symbols');
console.log(logSymbols.success, 'finished successfully!');
// On real OSes: ✔ finished successfully!
// On Windows: √ finished successfully!
console.log(logSymbols.success, 'Finished successfully!');
// On good OSes: ✔ Finished successfully!
// On Windows: √ Finished successfully!
```

@@ -38,4 +38,9 @@

## Related
- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows CMD fallbacks
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc