MCPcopy
hub / github.com/ThatGuySam/doesitarm / MapFlags

Function MapFlags

helpers/macho/macho.js:114–120  ·  view source on GitHub ↗
(value, map)

Source from the content-addressed store, hash-verified

112 @Return (Object) key-value mapped dictionary
113 */
114 function MapFlags(value, map) {
115 var res = {};
116 for (var bit = 1; (value < 0 || bit <= value) && bit !== 0; bit <<= 1)
117 if (value & bit) res[map[bit]] = true; //If value and the bit are equal then map the value to the result
118
119 return res;
120 }
121
122 function ParseCommand(type, data, size, off) {
123 var cmd = null;

Callers 1

onloadendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected