New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

color-cc

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-cc - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

index.d.ts

@@ -88,4 +88,4 @@ declare const foreAnsiCode: {

* expose
* @param needColor 是否需要颜色
* @returns {Object}
* @param {boolean} useColor 是否需要颜色
* @returns {ColorTool} colorsTool
* @example

@@ -92,0 +92,0 @@ * let colors = createColorfulTool(true);

@@ -64,9 +64,9 @@ "use strict";

'black',
'white',
'blue',
'red',
'green',
'yellow',
'blue',
'magenta',
'cyan',
'magenta',
'white',
'gray',

@@ -92,2 +92,5 @@ 'grey',

'bgCyan',
'bgWhite',
'bgGray',
'bgGrey',
// 特有

@@ -146,5 +149,5 @@ 'bgWhite',

/**
*
* @param options
* @returns
* 生成转换函数
* @param {Partial<ColorifyOptions>} options
* @returns {Function}
*/

@@ -171,4 +174,4 @@ function genFn(options) {

* expose
* @param needColor 是否需要颜色
* @returns {Object}
* @param {boolean} useColor 是否需要颜色
* @returns {ColorTool} colorsTool
* @example

@@ -307,3 +310,3 @@ * let colors = createColorfulTool(true);

* - 如果使用一个noop,会导致其子属性和自己形成循环依赖(noop.noop=noop, noop.noop.noop=noop)
* @returns
* @returns {Function} noop
*/

@@ -317,12 +320,13 @@ function genNoop() {

* 判断是否具有正常的 ansicode
* @param code
* @returns
* @param {unknown} code
* @returns {boolean}
*/
function isCorrectCode(code) {
// 原生 isNaN 对 understand 和 自定义 class 的实例会误判,不过这里不影响
return !(code === undefined || code === null) && !isNaN(code);
}
/**
* 严格判断 object,会排除 null
* @param obj
* @returns
* 判断 object/array,会排除 null
* @param {unknown} obj
* @returns {boolean}
*/

@@ -329,0 +333,0 @@ function isObject(obj) {

{
"name": "color-cc",
"version": "0.0.5",
"version": "0.0.6",
"description": "Get colors in your node.js console, support commonjs / typescript / esnext, simplified version of colors",

@@ -5,0 +5,0 @@ "author": "Froguard <figure_wf@163.com>",

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