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

tiny-chalk

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-chalk - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

21

index.js

@@ -1,3 +0,3 @@

// Copied from https://github.com/chalk/chalk
const styleMap = {
// Style map codes copied from https://github.com/chalk/chalk
const styleMap = /** @type {const} */ ({
// style

@@ -48,10 +48,19 @@ reset: [0, 0],

bgWhiteBright: [107, 49]
}
})
const chalk = Object.keys(styleMap).reduce((index, styleName) => {
index[styleName] = function (content) {
/**
* @callback StyleFunction
* @param {string} content - Text to style
* @returns {string} - Styled text
*
* @typedef {keyof typeof styleMap} StyleName
* @typedef {Record<StyleName, StyleFunction>} Chalk
*/
const chalk = /** @type {Chalk} */ (Object.keys(styleMap).reduce((index, styleName) => {
index[styleName] = /** @type {StyleFunction} */ function (content) {
return `\u001B[${styleMap[styleName][0]}m${content}\u001B[${styleMap[styleName][1]}m`
}
return index
}, {})
}, {}))

@@ -58,0 +67,0 @@ export default chalk

{
"name": "tiny-chalk",
"version": "3.0.1",
"version": "3.0.2",
"type": "module",
"description": "A super tiny version of chalk",
"main": "./index.js",
"scripts": {
"test": "node ./test.js"
},
"files": [

@@ -28,6 +31,3 @@ "index.js"

},
"homepage": "https://github.com/maxlath/tiny-chalk#readme",
"scripts": {
"test": "node ./test.js"
}
}
"homepage": "https://github.com/maxlath/tiny-chalk#readme"
}
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