badgen
Advanced tools
Comparing version 2.3.0 to 2.3.1
const widthsVerdana11 = require('./widths-verdana-11.json') | ||
const astralRegex = require('unicode-astral-regex') | ||
@@ -11,3 +10,3 @@ const SCALE = 10 // Prevent results like 60.599999999999994 | ||
return (text, astral) => { | ||
if (astral) text = text.match(astralRegex) || [] | ||
if (astral) text = [...text] | ||
@@ -14,0 +13,0 @@ let total = 0 |
{ | ||
"name": "badgen", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Fast svg badge generator.", | ||
@@ -19,9 +19,7 @@ "repository": "amio/badgen", | ||
"benchmark": "^2.1.4", | ||
"serve-marked": "0.3.2", | ||
"serve-marked": "0.3.3", | ||
"standard": "^11.0.1", | ||
"tap": "^12.0.1" | ||
}, | ||
"dependencies": { | ||
"unicode-astral-regex": "^1.0.1" | ||
} | ||
"dependencies": {} | ||
} |
@@ -1,2 +0,2 @@ | ||
# Badgen | ||
# badgen | ||
@@ -10,3 +10,3 @@ [![npm version][npm-src]][npm-href] | ||
- 🌀 1 dependency ([unicode-astral-regex](https://www.npmjs.com/package/unicode-astral-regex)) | ||
- 🌀 Zero dependency | ||
- ⚡️ Fast by design (see [benchmarks](#benchmarks)) | ||
@@ -47,11 +47,13 @@ - 👯 Pure JavaScript, running in node & browser | ||
`npm run bench` on my iMac5K(Late 2014), 3.5G i5, with Node.js 10.5.0: | ||
`npm run bench` on my MacBook Pro (Early 2015), 2.7G i5, with Node.js 10.9.0: | ||
```bash | ||
[classic] style, long params x 742,904 ops/sec ±0.92% (88 runs sampled) | ||
[classic] style, full params x 998,716 ops/sec ±0.78% (93 runs sampled) | ||
[flat] style, long params x 618,005 ops/sec ±0.77% (92 runs sampled) | ||
[flat] style, full params x 677,415 ops/sec ±0.67% (93 runs sampled) | ||
[classic] style, with emoji x 502,203 ops/sec ±2.11% (91 runs sampled) | ||
[classic] style, with icon x 844,518 ops/sec ±1.10% (94 runs sampled) | ||
[classic] style, long params x 1,317,650 ops/sec ±0.44% (88 runs sampled) | ||
[classic] style, full params x 1,711,139 ops/sec ±0.51% (94 runs sampled) | ||
[classic] style, with emoji x 1,308,026 ops/sec ±1.94% (88 runs sampled) | ||
[classic] style, with icon x 1,476,024 ops/sec ±0.48% (92 runs sampled) | ||
[flat] style, long params x 663,252 ops/sec ±0.65% (93 runs sampled) | ||
[flat] style, full params x 739,821 ops/sec ±1.56% (94 runs sampled) | ||
[flat] style, with emoji x 674,228 ops/sec ±3.05% (88 runs sampled) | ||
[flat] style, with icon x 764,540 ops/sec ±2.58% (88 runs sampled) | ||
``` | ||
@@ -58,0 +60,0 @@ |
0
67
8222
90
- Removedunicode-astral-regex@^1.0.1
- Removedunicode-astral-regex@1.0.1(transitive)