color-name-lists
Advanced tools
Comparing version 1.2.0 to 2.0.0
20
index.js
const { on } = require('events'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const directoryPath = path.join(__dirname, 'lib/colors'); | ||
const libPath = path.join(__dirname, 'lib'); | ||
const directoryPath = path.join(libPath, 'colors'); | ||
const descriptions = require(libPath + '/descriptions.json'); | ||
@@ -81,2 +83,16 @@ const wikipediaList = require('wikipedia-color-names/colors.min.json'); | ||
module.exports = lists; | ||
const sanitizedDescriptions = {}; | ||
Object.keys(descriptions).forEach(key => { | ||
const sanitizedKey = hyphensToCamelCase(key); | ||
const description = descriptions[key]; | ||
description.key = sanitizedKey; | ||
sanitizedDescriptions[sanitizedKey] = description; | ||
}); | ||
console.log(lists) | ||
module.exports = { | ||
lists, | ||
meta: sanitizedDescriptions | ||
}; |
{ | ||
"name": "color-name-lists", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "A collection of color name lists", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7552542
43
178764
3