
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
ansi-colors-nestable
Advanced tools
Enables nested coloring of texts using ansi-colors.
$ npm install ansi-colors-nestable --save-dev
const nestableColors = require('ansi-colors-nestable');
const ansiColors = require('ansi-colors');
const blue = nestableColors('blue');
const red = nestableColors(ansi.red);
blue('This package ', red('nested'), ' coloring of texts');
Returns a function which accepts multiple argument texts and colors each of them with color. If an argument text is already colored, that color is given precedence. As a result, this function make coloring nestable.
This function uses the package ansi-colors inside for supporting Node.js >= v0.10. So color names need to be supported by ansi-colors.
Parameter | Type | Description |
---|---|---|
color | string or function | color name or coloring function |
A coloring function which can colorize multiple argument texts.
Type: function
The API of this returned function is as follows:
color**(...texts): string**
Parameters:
Parameter | Type | Description |
---|---|---|
texts | string(s) | texts to be colored. |
Returned:
A colored and concatenated text
Type: string
This function has the same API with a returned function from nestableColors and simply returned a concatenated text of argument strings without coloring.
Parameter | Type | Description |
---|---|---|
texts | string(s) | texts to be colored. |
A concatenated text without coloring.
Type: string
Copyright (C) 2017 Takayuki Sato
This program is free software under MIT License. See the file LICENSE in this distribution for more details.
FAQs
Enables nested coloring of texts
We found that ansi-colors-nestable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.