Fuse-box client scripts integration + deps update

This commit is contained in:
NGPixel
2017-04-01 17:07:01 -04:00
parent f6c519c5dc
commit fe0c4ce0c0
23 changed files with 32342 additions and 64195 deletions

View File

@@ -1,13 +1,19 @@
/* global _ */
/* eslint-disable no-unused-vars */
'use strict'
function makeSafePath (rawPath) {
let rawParts = _.split(_.trim(rawPath), '/')
rawParts = _.map(rawParts, (r) => {
return _.kebabCase(_.deburr(_.trim(r)))
})
import _ from 'lodash'
return _.join(_.filter(rawParts, (r) => { return !_.isEmpty(r) }), '/')
module.exports = {
/**
* Convert raw path to safe path
* @param {string} rawPath Raw path
* @returns {string} Safe path
*/
makeSafePath: (rawPath) => {
let rawParts = _.split(_.trim(rawPath), '/')
rawParts = _.map(rawParts, (r) => {
return _.kebabCase(_.deburr(_.trim(r)))
})
return _.join(_.filter(rawParts, (r) => { return !_.isEmpty(r) }), '/')
}
}
/* eslint-enable no-unused-vars */