MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / IsUnsignedInteger

Function IsUnsignedInteger

include/nodejs/node_osrm_support.hpp:79–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79inline bool IsUnsignedInteger(const Napi::Value &value)
80{
81 if (!value.IsNumber())
82 {
83 return false;
84 }
85 const auto doubleValue = value.ToNumber().DoubleValue();
86 return doubleValue >= 0.0 && std::floor(doubleValue) == doubleValue;
87}
88
89inline void ParseResult(const osrm::Status &result_status, osrm::json::Object &result)
90{

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected