balena-cli/lib/resin/data/fs-utils/fs-utils.coffee

19 lines
368 B
CoffeeScript
Raw Normal View History

2014-11-14 12:58:05 -04:00
fs = require('fs')
2014-11-07 11:21:48 -04:00
_ = require('lodash')
2014-12-05 14:39:12 -04:00
# Check if valid path
#
# @private
#
# @param {String} path path
# @return {Boolean} is valid path
#
# @todo There should be more complex checks here
#
# @example Is valid path?
# console.log isValidPath('/Users/me') # True
# console.log isValidPath([ 1, 2, 3 ]) # False
#
2014-11-07 11:21:48 -04:00
exports.isValidPath = (p) ->
return _.isString(p)