Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | const pathToArrayTransformer = require('./src/pathToArrayTransformer.js'); const pathValidator = require('./src/pathValidator.js'); /** * Transforms string representation of path into workable array representation * @param {any} path - either already transformed path, or string representation of path * @returns {Array} - array representation of path */ const pathTransformer = (path) => (typeof path === 'string' ? pathToArrayTransformer(path) : pathValidator(path)); module.exports = pathTransformer; |