You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# this function need do be split in two and refactorated
function getPathFromModulesNode() {
local mystring=$1
local ref_item=""
local -a arrPaths
arrPaths=()
arr=("${(@s/,/)mystring}")
#getNodeModulePath $arr[1]
for i in $arr; do
local global_dir="$NODE_MODULES_GLOBAL_DIR/$i"
if [ -d "$global_dir" ]
then
arrPaths+=($global_dir)
else
arrPaths+=($i)
fi
done
echo ${(u)arrPaths[@]}
}