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

19 lines
368 B
CoffeeScript
Raw Normal View History

2014-11-14 16:58:05 +00:00
fs = require('fs')
2014-11-07 15:21:48 +00:00
_ = require('lodash')
2014-12-05 18:39:12 +00: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 15:21:48 +00:00
exports.isValidPath = (p) ->
return _.isString(p)