Darwin is not OSX, OSX is Darwin.
Darwin is the core of OSX, in the same way, Linux is the core of Debian, Ubuntu, and every other Linux distributions.
Since the open source project is dead, you can safely assume that a platform identified as Darwin is either macOS (including OSX), iOS, watchOS or tvOS, for the mac, iPhone, apple watch and apple tv.
While you can't make the shortcut
darwin => OSX blindly, I don t know of any port of node.js for the others device, so yes, if you get darwin, you can be almost sure it is a macOS device, but it could be another version than OSX.