doowb/ansi-colors

open to a PR using proxy?

jonschlinkert opened this issue · 1 comments

The changes would use latest es features, so it would definitely be a major bump.

The advantage of using proxy is that - the way I'm implementing it - methods will only be created when or if they are called the first time.

In benchmarks, it's screaming fast both on initial load:

ansi-colors: 0.798ms
chalk: 11.025ms
clorox: 1.031ms

and when the methods are called subsequently:

# All Colors
  ansi-colors x 31,995 ops/sec ±1.23% (89 runs sampled)
  chalk x 9,510 ops/sec ±1.93% (82 runs sampled)
  clorox x 1,447 ops/sec ±2.35% (78 runs sampled)

# Stacked colors
  ansi-colors x 10,066 ops/sec ±0.81% (89 runs sampled)
  chalk x 1,910 ops/sec ±1.69% (81 runs sampled)
  clorox x 579 ops/sec ±2.02% (66 runs sampled)

# Nested colors
  ansi-colors x 14,256 ops/sec ±0.49% (94 runs sampled)
  chalk x 4,259 ops/sec ±2.00% (83 runs sampled)
  clorox x 677 ops/sec ±2.17% (76 runs sampled)
doowb commented

Definitely!!!

I think we can specify in the readme which published tag/version to use for older versions.