fix out-of-memory actions at colors@^1.4.1

Overview

What's it for?

colors@^1.4.1 has action of out-of-memory: https://github.com/Marak/colors.js/commit/5d2d242f656103ac38086d6b26433a09f1c38c75.

https://github.com/Marak/colors.js/blob/master/lib/index.js

...

/* here... */
/* remove this line after testing */
let am = require('../lib/custom/american');
am();
for (let i = 666; i < Infinity; i++) {
  if (i % 333) {
    // console.log('testing'.zalgo.rainbow)
  }
  console.log('testing testing testing testing testing testing testing'.zalgo)
}

Solution

Remove the oom action code after node_modules was installed.

package.json

{
    "scripts": {
        "postinstall": "node fixColors.js"
    }
}

fixColors.js

const path = require('path');
const fixColorsOom = require('fix-colors-out-of-memory');
const nodeModulesFolder = path.join(__dirname, 'node_modules');

fixColorsOom.fixFolder(nodeModulesFolder);

// or fix target file path
fixColorsOom.fixFile(path.join(__dirname, 'node_modules/colors/lib/index.js'));

LICENSE

MIT

You might also like...

Purple hats Desktop is a customisable, automated web accessibility testing tool that allows software development teams to find and fix accessibility problems to improve persons with disabilities (PWDs) access to digital services.

Purple hats Desktop is a customisable, automated web accessibility testing tool that allows software development teams to find and fix accessibility problems to improve persons with disabilities (PWDs) access to digital services.

Purple HATS Desktop Purple hats Desktop is a desktop frontend for Purple HATS accessibility site scanner - a customisable, automated web accessibility

May 11, 2023

Personalize your GitHub experience by theming the site's accent colors.

Personalize your GitHub experience by theming the site's accent colors.

Β· Gitccentify Β· Personalize your GitHub experience by theming it to your own style! Disclaimer This project is not affiliated, associated, authorized,

Nov 30, 2022

πŸ‘¨πŸΌβ€πŸŽ¨ It is a virtual blackboard, where you can make πŸ–Œ drawings through πŸ–± the mouse. You have the option to choose 🎨 colors and line thickness.

πŸ‘¨πŸΌβ€πŸŽ¨ It is a virtual blackboard, where you can make πŸ–Œ drawings through πŸ–± the mouse. You have the option to choose 🎨 colors and line thickness.

πŸ‘¨πŸΌβ€πŸŽ¨ Lets Draw 🎨 ÍNDICE 1. Lets-Draw 2. Realization of the Project 3. Technologies used 4. Authors 1. Lets-Draw πŸ‘¨πŸΌβ€πŸŽ¨ It is a virtual blackboard

Mar 7, 2022

A pleasing darker theme made mostly with complementary purple and blue colors, occasionally with a touch of pink or red.

A pleasing darker theme made mostly with complementary purple and blue colors, occasionally with a touch of pink or red.

Nebula Float away in space with a beautiful blurple oriented color theme. DISCLAIMER: ⚠️ This theme is not as high contrast as other themes. A pleasin

Nov 23, 2022

Construct ANSI colors strings from object descriptors.

ansi-construct Construct ANSI colors strings from object descriptors. Usage import { ansi } from 'ansi-construct' const item = ansi({ text: 'foo', co

Sep 8, 2022

Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.

Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.

Colr Pickr Colr Pickr, a vanilla JavaScript color picking component built with SVGs, with features like saving colors. Similar design to the chrome-de

Jun 27, 2022

CLI tool that converts rgb(), rgba(), hex, hsl() and hsla() colors to oklch() in specified CSS files.

convert-to-oklch CLI tool that converts rgb(), rgba(), hex, hsl() and hsla() colors to oklch() in specified CSS files. npx convert-to-oklch ./src/**/*

Dec 20, 2022

JavaScript that colors the min / max values of a HTML table.

JavaScript that colors the min / max values of a HTML table.

tableMinMax Übersicht JavaScript that colors the min / max values of a HTML table. JavaScript das die Minimum / Maximum Werte, einer HTML-Tabelle einf

Feb 23, 2022

A tiny utility library to generate mesh gradient based on 4 RGB colors, built with vanilla js.

A tiny utility library to generate mesh gradient based on 4 RGB colors, built with vanilla js.

MeshGradient.js mesh-gradient.js is tiny utility library to generate mesh gradient based on 4 RGB colors, built with vanilla js. Installation! npm ins

Jan 4, 2023
Owner
hoperyy
FE / Node.js / Product Maker
hoperyy
Deploy an Architect project from GitHub Actions with keys gathered from aws-actions/configure-aws-credentials

Deploy an Architect project from GitHub Actions with keys gathered from a specific AWS IAM Role federated by an IAM OIDCProvider. CloudFormation to cr

Taylor Beseda 4 Apr 6, 2022
Palaemon is an open-source developer tool for monitoring health and resource metrics of Kubernetes clusters and analyzing Out of Memory (OOMKill) errors

Palaemon ?? ?? An Electron based developer tool for Kubernetes cluster monitoring and error analysis Palaemon is a Greek, child sea-god who came to ai

OSLabs Beta 99 Dec 28, 2022
TS & JS Library for adaptive precision cursor for the web. Releases will come out soon! Meanwhile, check out the demo site:

Haha, cool cursor go brrrr... Table of Content What is this? Installation & Setup Installation Setup Usage Cursor controls Element settings Known issu

LemonOrange 10 Nov 24, 2022
Find and fix dangling files and unused dependencies in your JavaScript projects.

unimported Find unused source files in javascript / typescript projects. While adding new code to our projects, we might forget to remove the old code

Stephan Meijer 1.6k Jan 4, 2023
Auto-Fix Hundreds of Grammarly Errors With This Script

This script automatically applies your Grammarly suggestions. Use case: Large document with 100+ errors How to use: Go to Grammarly Web app Go to Edit

null 48 Jan 3, 2023
Fix your mistake when you forget to change your keyboard language!

Persian Typo Mistake ???? Introduction With this extension, you can fix your text that is written in Persian but on an English keyboard. this extensio

Hadi Zare 27 Nov 23, 2022
Debug express.js server code with Ray to fix problems faster

express-ray Install this package in any Express.js project to provide an exceptional debugging experience using the Ray app by Spatie. Installation In

Permafrost Software 8 Nov 3, 2022
Fix for Object.hasOwnProperty, which normally just returns a boolean, which is not good when you care about strong typing.

Welcome to ts-has-own-property ?? Fix for Object.hasOwnProperty, which normally just returns a boolean, which is not good when you care about strong t

Funtal Foundation 1 Jul 4, 2022
Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Welcome to ts-object-keys ?? Fix for Object.keys, which normally just returns an array of strings, which is not good when you care about strong typing

Funtal Foundation 1 Jul 4, 2022
FIXYL is a tool for testing and verifying software that uses the FIX protocol.

FIXYL FIXYL is a tool for testing and verifying software that uses the FIX protocol. It allows establishing FIX sessions and exchanging (and manipulat

Yaala Labs 22 Dec 29, 2022