color-name-list 11.1.0 → 11.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "color-name-list",
3
- "version": "11.1.0",
3
+ "version": "11.3.0",
4
4
  "description": "long list of color names",
5
5
  "main": "dist/colornames.json",
6
6
  "browser": "dist/colornames.umd.js",
package/scripts/build.js CHANGED
@@ -41,7 +41,7 @@ const src = fs.readFileSync(
41
41
  const colorsSrc = parseCSVString(src);
42
42
 
43
43
  // sort by sorting criteria
44
- colorsSrc.entires.sort((a, b) => {
44
+ colorsSrc.entries.sort((a, b) => {
45
45
  return a[sortBy].localeCompare(b[sortBy]);
46
46
  });
47
47
 
@@ -101,7 +101,7 @@ if (isTestRun) {
101
101
 
102
102
  // creates JS related files
103
103
  const JSONExportString = JSON.stringify(
104
- [...colorsSrc.entires].map( // removes good name attributes
104
+ [...colorsSrc.entries].map( // removes good name attributes
105
105
  (val) => ({
106
106
  name: val.name,
107
107
  hex: val.hex,
@@ -110,7 +110,7 @@ const JSONExportString = JSON.stringify(
110
110
  );
111
111
 
112
112
  const JSONExportStringBestOf = JSON.stringify(
113
- [...colorsSrc.entires].filter(
113
+ [...colorsSrc.entries].filter(
114
114
  (val) => (val[bestOfKey])
115
115
  ).map( // removes good name attributes
116
116
  (val) => ({
@@ -121,7 +121,7 @@ const JSONExportStringBestOf = JSON.stringify(
121
121
  );
122
122
 
123
123
  const JSONExportStringShort = JSON.stringify(
124
- [...colorsSrc.entires]
124
+ [...colorsSrc.entries]
125
125
  .filter(
126
126
  // make sure its only one word long
127
127
  (val) =>
@@ -154,19 +154,19 @@ fs.writeFileSync(
154
154
  );
155
155
 
156
156
  // creates a more compact JSON file, where the HEX color serves as an id
157
- const miniJSONExportObj = colorsSrc.entires.reduce((obj, entry) => {
157
+ const miniJSONExportObj = colorsSrc.entries.reduce((obj, entry) => {
158
158
  obj[entry.hex.replace('#', '')] = entry.name;
159
159
  return obj;
160
160
  }, {});
161
161
 
162
- const miniJSONExportObjBestOf = colorsSrc.entires.reduce((obj, entry) => {
162
+ const miniJSONExportObjBestOf = colorsSrc.entries.reduce((obj, entry) => {
163
163
  if(entry[bestOfKey]) {
164
164
  obj[entry.hex.replace('#', '')] = entry.name;
165
165
  }
166
166
  return obj;
167
167
  }, {});
168
168
 
169
- const miniJSONExportObjShort = colorsSrc.entires.reduce((obj, entry) => {
169
+ const miniJSONExportObjShort = colorsSrc.entries.reduce((obj, entry) => {
170
170
  if (
171
171
  entry[bestOfKey] &&
172
172
  //entry.name.split(" ").length === 1 &&
@@ -287,7 +287,7 @@ const outputFormats = {
287
287
  for (const outputFormat in outputFormats) {
288
288
  if (outputFormats[outputFormat]) {
289
289
  let outputString = objArrToString(
290
- colorsSrc.entires,
290
+ colorsSrc.entries,
291
291
  csvKeys,
292
292
  outputFormats[outputFormat]
293
293
  );
@@ -305,7 +305,7 @@ for (const outputFormat in outputFormats) {
305
305
  for (const outputFormat in outputFormats) {
306
306
  if (outputFormats[outputFormat]) {
307
307
  let outputString = objArrToString(
308
- colorsSrc.entires.filter((val) => (val[bestOfKey])),
308
+ colorsSrc.entries.filter((val) => (val[bestOfKey])),
309
309
  csvKeys,
310
310
  outputFormats[outputFormat]
311
311
  );
@@ -323,7 +323,7 @@ for (const outputFormat in outputFormats) {
323
323
  for (const outputFormat in outputFormats) {
324
324
  if (outputFormats[outputFormat]) {
325
325
  let outputString = objArrToString(
326
- colorsSrc.entires.filter(
326
+ colorsSrc.entries.filter(
327
327
  (val) =>
328
328
  val[bestOfKey] &&
329
329
  //val.name.split(" ").length === 1 &&
@@ -352,15 +352,15 @@ fs.writeFileSync(
352
352
  readme.replace(
353
353
  // update color count in text
354
354
  /__\d+__/g,
355
- `__${colorsSrc.entires.length}__`
355
+ `__${colorsSrc.entries.length}__`
356
356
  ).replace(
357
357
  // update color count in badge
358
358
  /\d+-colors-orange/,
359
- `${colorsSrc.entires.length}-colors-orange`
359
+ `${colorsSrc.entries.length}-colors-orange`
360
360
  ).replace(
361
361
  // update color count in percentage
362
362
  /__\d+(\.\d+)?%__/,
363
- `__${((colorsSrc.entires.length / (256 * 256 * 256)) * 100).toFixed(2)}%__`
363
+ `__${((colorsSrc.entries.length / (256 * 256 * 256)) * 100).toFixed(2)}%__`
364
364
  ).replace(
365
365
  // update file size
366
366
  /\d+(\.\d+)? MB\)__/g,
@@ -399,7 +399,7 @@ function showLog() {
399
399
  function log(key, value, message, errorLevel = 1) {
400
400
  const error = {};
401
401
  // looks for the original item that caused the error
402
- error.entries = colorsSrc.entires.filter((entry) => {
402
+ error.entries = colorsSrc.entries.filter((entry) => {
403
403
  return entry[key] === value;
404
404
  });
405
405
 
package/scripts/lib.js CHANGED
@@ -27,7 +27,7 @@ export const parseCSVString = (
27
27
  values[header] = [];
28
28
  });
29
29
 
30
- const entires = rows.map((row) => {
30
+ const entries = rows.map((row) => {
31
31
  // decomposes each row into its single entries
32
32
  const rowArr = row.split(csvDelimitor);
33
33
 
@@ -46,7 +46,7 @@ export const parseCSVString = (
46
46
  return entry;
47
47
  });
48
48
 
49
- return {headers, entires, values};
49
+ return {headers, entries, values};
50
50
  };
51
51
 
52
52
  /**
@@ -13509,6 +13509,7 @@ Ionized-air Glow,#55ddff,
13509
13509
  Iqaluit Ice,#93cfe3,
13510
13510
  Ireland Green,#006c2e,
13511
13511
  Iridescent,#3a5b52,x
13512
+ Iridescent Blue,#0153c8,
13512
13513
  Iridescent Green,#48c072,
13513
13514
  Iridescent Peacock,#00707d,
13514
13515
  Iridescent Purple,#966fd6,
@@ -14320,6 +14321,7 @@ Kyoto Pearl,#dfd6d1,
14320
14321
  Kyuri Green,#4b5d16,
14321
14322
  La Grange,#7a7a60,
14322
14323
  Là Jiāo Hóng Red,#fc2647,
14324
+ La La Lavender,#a3498a,
14323
14325
  La La Love,#bf90bb,x
14324
14326
  La Luna,#ffffe5,x
14325
14327
  La Luna Amarilla,#fddfa0,
@@ -19053,6 +19055,7 @@ Overcast Brick,#b3583d,
19053
19055
  Overcast Day,#8f99a2,
19054
19056
  Overcast Night,#42426f,
19055
19057
  Overcast Sky,#a7b8c4,
19058
+ Overchlorinated Pool,#0ae9b4,
19056
19059
  Overdue Blue,#4400ff,x
19057
19060
  Overdue Grey,#c7c3be,
19058
19061
  Overexposed Shot,#eff4dc,
@@ -19342,6 +19345,7 @@ Palomino Pony,#837871,
19342
19345
  Palomino Tan,#c2aa8d,
19343
19346
  Pampas,#eae4dc,
19344
19347
  Pampered Princess,#f5eaeb,
19348
+ Pan de Coco,#dca356,
19345
19349
  Pan Purple,#657aef,x
19346
19350
  Pan Tostado,#e8be99,
19347
19351
  Panache,#ebf7e4,
@@ -21525,6 +21529,7 @@ Purple Void,#442244,x
21525
21529
  Purple White,#d3c2cf,
21526
21530
  Purple Wine,#97397f,
21527
21531
  Purple Wineberry,#5a395b,
21532
+ Purple Yam,#a846d7,
21528
21533
  Purple Yearning,#dd1166,
21529
21534
  Purple Zergling,#a15589,x
21530
21535
  Purple’s Baby Sister,#eec3ee,x
@@ -21786,6 +21791,7 @@ Rainforest,#009a70,x
21786
21791
  Rainforest Dew,#e6dab1,
21787
21792
  Rainforest Fern,#cec192,
21788
21793
  Rainforest Glow,#b2c346,
21794
+ Rainforest Matcha,#446019,
21789
21795
  Rainforest Nights,#002200,
21790
21796
  Rainforest Zipline,#7f795f,
21791
21797
  Rainier Blue,#558484,
@@ -28003,6 +28009,7 @@ Tzatziki Green,#ddeecc,
28003
28009
  UA Blue,#0033aa,
28004
28010
  UA Red,#d9004c,
28005
28011
  Ube,#8878c3,
28012
+ Ube Halaya,#a86093,
28006
28013
  Über Umber,#7b5838,
28007
28014
  UCLA Blue,#536895,
28008
28015
  UCLA Gold,#ffb300,