Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buf-compare

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buf-compare - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

index.js
'use strict';
module.exports = function (a, b) {
module.exports = Buffer.compare || function (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {

@@ -11,6 +11,2 @@ throw new TypeError('Arguments must be Buffers');

if (typeof Buffer.compare === 'function') {
return Buffer.compare(a, b);
}
var x = a.length;

@@ -17,0 +13,0 @@ var y = b.length;

8

package.json
{
"name": "buf-compare",
"version": "1.0.0",
"description": "Node.js 0.12 Buffer.compare() ponyfill",
"version": "1.0.1",
"description": "Node.js `Buffer.compare()` ponyfill",
"license": "MIT",

@@ -16,3 +16,3 @@ "repository": "sindresorhus/buf-compare",

"scripts": {
"test": "node test.js"
"test": "ava"
},

@@ -36,4 +36,4 @@ "files": [

"devDependencies": {
"ava": "0.0.4"
"ava": "*"
}
}
# buf-compare [![Build Status](https://travis-ci.org/sindresorhus/buf-compare.svg?branch=master)](https://travis-ci.org/sindresorhus/buf-compare)
> Node.js 0.12 [`Buffer.compare()`](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_compare_buf1_buf2) ponyfill
> Node.js [`Buffer.compare()`](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_compare_buf1_buf2) [ponyfill](https://ponyfill.com)
> Ponyfill: A polyfill that doesn't overwrite the native method
## Install

@@ -35,4 +33,4 @@

- [buffer-equals](https://github.com/sindresorhus/buffer-equals) - Node.js 0.12 `buffer.equals()` ponyfill
- [buf-indexof](https://github.com/sindresorhus/buf-indexof) - io.js 1.5.0 (Node.js) `buffer.indexOf()` ponyfill
- [buffer-equals](https://github.com/sindresorhus/buffer-equals) - Node.js `buffer.equals()` ponyfill
- [buf-indexof](https://github.com/sindresorhus/buf-indexof) - Node.js `buffer.indexOf()` ponyfill

@@ -39,0 +37,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc