How to use the alloc function from buffer
Find comprehensive JavaScript buffer.alloc code examples handpicked from public code repositorys.
GitHub: bolucat/Firefox
126 127 128 129 130 131 132 133 134 135 136 137 138
ip.mask = function(addr, mask) { addr = ip.toBuffer(addr); mask = ip.toBuffer(mask); var result = Buffer.alloc(Math.max(addr.length, mask.length)); var i = 0; // Same protocol - do bitwise and if (addr.length === mask.length) {
13
24
1
+ 3 other calls in file
buffer.Buffer is the most popular function in buffer (219 examples)