How to use buffer-equal - 8 common examples

To help you get started, we’ve selected a few buffer-equal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jaegertracing / jaeger-client-node / test / lib / util.js View on Github external
static thriftSpanEqual(spanOne, spanTwo) {
        // TODO(oibe) in references diff add equality check here
        return  bufferEqual(spanOne.traceIdLow, spanTwo.traceIdLow) &&
                bufferEqual(spanOne.traceIdHigh, spanTwo.traceIdHigh) &&
                bufferEqual(spanOne.spanId, spanTwo.spanId) &&
                bufferEqual(spanOne.parentSpanId, spanTwo.parentSpanId) &&
                spanOne.operationName === spanTwo.operationName &&
                spanOne.flags === spanTwo.flags &&
                bufferEqual(spanOne.startTime, spanTwo.startTime) &&
                bufferEqual(spanOne.duration, spanTwo.duration);
    }
}
github jaegertracing / jaeger-client-node / test / lib / util.js View on Github external
static thriftSpanEqual(spanOne, spanTwo) {
        // TODO(oibe) in references diff add equality check here
        return  bufferEqual(spanOne.traceIdLow, spanTwo.traceIdLow) &&
                bufferEqual(spanOne.traceIdHigh, spanTwo.traceIdHigh) &&
                bufferEqual(spanOne.spanId, spanTwo.spanId) &&
                bufferEqual(spanOne.parentSpanId, spanTwo.parentSpanId) &&
                spanOne.operationName === spanTwo.operationName &&
                spanOne.flags === spanTwo.flags &&
                bufferEqual(spanOne.startTime, spanTwo.startTime) &&
                bufferEqual(spanOne.duration, spanTwo.duration);
    }
}
github jaegertracing / jaeger-client-node / test / lib / util.js View on Github external
static thriftSpanEqual(spanOne, spanTwo) {
        // TODO(oibe) in references diff add equality check here
        return  bufferEqual(spanOne.traceIdLow, spanTwo.traceIdLow) &&
                bufferEqual(spanOne.traceIdHigh, spanTwo.traceIdHigh) &&
                bufferEqual(spanOne.spanId, spanTwo.spanId) &&
                bufferEqual(spanOne.parentSpanId, spanTwo.parentSpanId) &&
                spanOne.operationName === spanTwo.operationName &&
                spanOne.flags === spanTwo.flags &&
                bufferEqual(spanOne.startTime, spanTwo.startTime) &&
                bufferEqual(spanOne.duration, spanTwo.duration);
    }
}
github jaegertracing / jaeger-client-node / test / lib / util.js View on Github external
static thriftSpanEqual(spanOne, spanTwo) {
        // TODO(oibe) in references diff add equality check here
        return  bufferEqual(spanOne.traceIdLow, spanTwo.traceIdLow) &&
                bufferEqual(spanOne.traceIdHigh, spanTwo.traceIdHigh) &&
                bufferEqual(spanOne.spanId, spanTwo.spanId) &&
                bufferEqual(spanOne.parentSpanId, spanTwo.parentSpanId) &&
                spanOne.operationName === spanTwo.operationName &&
                spanOne.flags === spanTwo.flags &&
                bufferEqual(spanOne.startTime, spanTwo.startTime) &&
                bufferEqual(spanOne.duration, spanTwo.duration);
    }
}
github jaegertracing / jaeger-client-node / test / lib / util.js View on Github external
static thriftSpanEqual(spanOne, spanTwo) {
        // TODO(oibe) in references diff add equality check here
        return  bufferEqual(spanOne.traceIdLow, spanTwo.traceIdLow) &&
                bufferEqual(spanOne.traceIdHigh, spanTwo.traceIdHigh) &&
                bufferEqual(spanOne.spanId, spanTwo.spanId) &&
                bufferEqual(spanOne.parentSpanId, spanTwo.parentSpanId) &&
                spanOne.operationName === spanTwo.operationName &&
                spanOne.flags === spanTwo.flags &&
                bufferEqual(spanOne.startTime, spanTwo.startTime) &&
                bufferEqual(spanOne.duration, spanTwo.duration);
    }
}
github jaegertracing / jaeger-client-node / test / lib / util.js View on Github external
static thriftSpanEqual(spanOne, spanTwo) {
        // TODO(oibe) in references diff add equality check here
        return  bufferEqual(spanOne.traceIdLow, spanTwo.traceIdLow) &&
                bufferEqual(spanOne.traceIdHigh, spanTwo.traceIdHigh) &&
                bufferEqual(spanOne.spanId, spanTwo.spanId) &&
                bufferEqual(spanOne.parentSpanId, spanTwo.parentSpanId) &&
                spanOne.operationName === spanTwo.operationName &&
                spanOne.flags === spanTwo.flags &&
                bufferEqual(spanOne.startTime, spanTwo.startTime) &&
                bufferEqual(spanOne.duration, spanTwo.duration);
    }
}
github heineiuo / rippledb / src / Skiplist2.js View on Github external
function isEqual(a, b) {
  if (!(Buffer.isBuffer(a) && Buffer.isBuffer(b))) return a === b;
  return bufferEqual(a, b);
}
github heineiuo / rippledb / src / LevelUtils.js View on Github external
export function isEqual (a:Slice, b:Slice):boolean {
  if (!(Buffer.isBuffer(a) && Buffer.isBuffer(b))) return a === b
  return bufferEqual(a, b)
}

buffer-equal

return whether two buffers are equal

MIT
Latest version published 2 years ago

Package Health Score

71 / 100
Full package analysis

Popular buffer-equal functions