Add `nvm_is_merged_node_version`

Jordan Harband 2015-08-23 22:09:31 -07:00
parent 26ee4aafc0
commit f34fef96d8
2 changed files with 14 additions and 0 deletions

4
nvm.sh
View File

@ -927,6 +927,10 @@ nvm_ensure_default_set() {
return $EXIT_CODE return $EXIT_CODE
} }
nvm_is_merged_node_version() {
nvm_version_greater_than_or_equal_to "$1" v4.0.0
}
nvm_install_iojs_binary() { nvm_install_iojs_binary() {
local NVM_IOJS_TYPE local NVM_IOJS_TYPE
NVM_IOJS_TYPE="$1" NVM_IOJS_TYPE="$1"

View File

@ -0,0 +1,10 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
nvm_is_merged_node_version '4.0' || die '"nvm_is_merged_node_version 4.0 was not true'
nvm_is_merged_node_version '5.1' || die '"nvm_is_merged_node_version 5.1 was not true'
! nvm_is_merged_node_version '3.99' || die '"nvm_is_merged_node_version 3.99 was not false'
! nvm_is_merged_node_version 'v1.0.0' || die '"nvm_is_merged_node_version v1.0.0" was not false'