Skip to content

Commit

Permalink
Merge pull request #54 from mindplay-dk/patch-1
Browse files Browse the repository at this point in the history
Minor change to improve support for Parcel/SWC
  • Loading branch information
jonschlinkert committed May 15, 2022
2 parents a479436 + 558d4e7 commit c765510
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions index.js
Expand Up @@ -8,11 +8,12 @@ const identity = val => val;
const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g;

const create = () => {
const colors = { enabled: true, visible: true, styles: {}, keys: {} };

if ('FORCE_COLOR' in process.env) {
colors.enabled = process.env.FORCE_COLOR !== '0';
}
const colors = {
enabled: process.env.FORCE_COLOR !== '0',
visible: true,
styles: {},
keys: {}
};

const ansi = style => {
let open = style.open = `\u001b[${style.codes[0]}m`;
Expand Down

0 comments on commit c765510

Please sign in to comment.