@lucide/helpers
Version:
A internal used package with helpers.
13 lines (11 loc) • 341 B
JavaScript
import fs from 'fs';
import path from 'path';
/**
* Reads metadata for an icon or category
*
* @param {string} fileName
* @param {string} directory
* @returns {object} The metadata for the icon or category
*/
export const readMetadata = (fileName, directory) =>
JSON.parse(fs.readFileSync(path.join(directory, fileName), 'utf-8'));