mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-16 01:40:15 +00:00
19 lines
368 B
CoffeeScript
19 lines
368 B
CoffeeScript
fs = require('fs')
|
|
_ = require('lodash')
|
|
|
|
# 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
|
|
#
|
|
exports.isValidPath = (p) ->
|
|
return _.isString(p)
|