Necroing a thread a bit, but figure I'd throw in a solution for this for anyone looking. In JavaScript there's a few options for changing a string to an integer. Number('1') and +'1' both work pretty much identically.
As for actually grabbing the durability values, RegEx is the way to go.
function DurabilityTest()
{
Orion.WaitForAddObject('myTarget');
Orion.Print(GetDurability('myTarget'));
}
function GetDurability(objSerial)
{
var obj = Orion.FindObject(objSerial);
var durabilityArr = obj.Properties().match(/Durability (\d+) \/ (\d+)/) //evaluates to e.g., ['Durability 250 / 255', '250', '255'] OR null if match isn't found
if(!durabilityArr) //if a match isn't found returns false
return false;
var minDurability = +durabilityArr[1]; //convert string to int
var maxDurability = Number(durabilityArr[2]); //convert string to int
return [minDurability, maxDurability]; //e.g. [250, 255]
}