UNPKG

style-dictionary

Version:

Style once, use everywhere. A build system for creating cross-platform styles.

14 lines (13 loc) 348 B
/** * Returns the paths name be joining its parts with separator '.'. * * @private * @param {string[]} path * @returns {string} - The paths name */ export default function getName(path) { if (!Array.isArray(path)) { throw new Error('Getting name for path failed. Token path must be an array of strings'); } return path.join('.'); }