Comparing version 6.0.2 to 6.1.0
@@ -0,4 +1,6 @@ | ||
var platform = require('./platform'); | ||
// Fork from https://github.com/sindresorhus/has-flag | ||
var hasFlag = function hasFlag(flag, argv) { | ||
argv = argv || process.argv; | ||
argv = argv || platform.argv; | ||
var prefix = flag.indexOf('-') === 0 ? '' : flag.length === 1 ? '-' : '--'; | ||
@@ -11,4 +13,3 @@ var pos = argv.indexOf(prefix + flag); | ||
// Fork from https://github.com/chalk/supports-color | ||
var os = require('os'); | ||
var env = process.env; | ||
var env = platform.env; | ||
@@ -20,2 +21,4 @@ var forceColor = void 0; | ||
forceColor = 1; | ||
} else if (platform.runtime === 'deno') { | ||
forceColor = platform.color; | ||
} | ||
@@ -69,3 +72,3 @@ | ||
if (process.platform === 'win32') { | ||
if (platform.runtime === 'node' && process.platform === 'win32') { | ||
// Node.js 7.5.0 is the first version of Node.js to include a patch to | ||
@@ -77,3 +80,3 @@ // libuv that enables 256 color output on Windows. Anything earlier and it | ||
// that supports 16m/TrueColor. | ||
var osRelease = os.release().split('.'); | ||
var osRelease = platform.getNodeRelease().split('.'); | ||
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { | ||
@@ -80,0 +83,0 @@ return Number(osRelease[2]) >= 14931 ? 3 : 2; |
{ | ||
"name": "magicpen", | ||
"version": "6.0.2", | ||
"version": "6.1.0", | ||
"description": "Styled output in both consoles and browsers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/MagicPen.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140659
20
3100
1