Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "smallchalk", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Like Chalk.js, but smaller and with fewer features", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,4 +1,20 @@ | ||
[![npm version](https://badge.fury.io/js/smallchalk.svg)](https://badge.fury.io/js/smallchalk) | ||
# SmallChalk | ||
Like Chalk.js, but smaller and with fewer features. Meant for rapid prototyping without worrying about package.json bloat | ||
Core functionality like Chalk.js but with fewer features. Meant for rapid prototyping without worrying about package.json bloat. | ||
Extremely small package size, coming in at only **819B gzipped & minified**! | ||
# Installation | ||
``` | ||
npm i smallchalk | ||
``` | ||
or | ||
``` | ||
yarn add smallchalk | ||
``` | ||
# Example | ||
@@ -9,3 +25,3 @@ | ||
```javascript | ||
const smallChalk = require('./SmallChalk'); | ||
const smallChalk = require('smallchalk'); | ||
@@ -12,0 +28,0 @@ const message = smallChalk.bgRed.black.bold.underline("I am a test message"); |
@@ -59,10 +59,9 @@ const colors = { | ||
const smallChalk = { template: () => {} }; | ||
Object.setPrototypeOf(smallChalk, SmallChalk.prototype); | ||
Object.setPrototypeOf(smallChalk.template, smallChalk); | ||
return smallChalk.template; | ||
return smallChalk; | ||
} | ||
function createColors(fgbg) { // fgbg = one of: 'fg', 'bg', 'foreground', 'background' | ||
function createColors(fgbg) { // fgbg = one of ['fg', 'bg', 'foreground', 'background'] | ||
const allowed = ['fg', 'bg', 'foreground', 'background']; | ||
@@ -69,0 +68,0 @@ |
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
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
5802
62
131