Comparing version 2.3.3 to 2.3.4
@@ -130,3 +130,3 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"Focm2+":[function(require,module,exports){ | ||
Buffer.isBuffer = function (b) { | ||
return !!(b !== null && b !== undefined && b._isBuffer) | ||
return !!(b != null && b._isBuffer) | ||
} | ||
@@ -133,0 +133,0 @@ |
@@ -129,3 +129,3 @@ /*! | ||
Buffer.isBuffer = function (b) { | ||
return !!(b !== null && b !== undefined && b._isBuffer) | ||
return !!(b != null && b._isBuffer) | ||
} | ||
@@ -132,0 +132,0 @@ |
{ | ||
"name": "buffer", | ||
"description": "Node.js Buffer API, for the browser", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh", |
@@ -7,19 +7,19 @@ # buffer [![build](https://img.shields.io/travis/feross/buffer.svg)](https://travis-ci.org/feross/buffer) [![npm](https://img.shields.io/npm/v/buffer.svg)](https://npmjs.org/package/buffer) [![npm downloads](https://img.shields.io/npm/dm/buffer.svg)](https://npmjs.org/package/buffer) [![gittip](https://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/) | ||
When you `require('buffer')` or use the `Buffer` global in [browserify](http://github.com/substack/node-browserify), this module will automatically load. | ||
With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. | ||
The goal is to provide a Buffer API that is 100% identical to node's Buffer API. Read | ||
the [official node.js docs](http://nodejs.org/api/buffer.html) for a full list of | ||
supported methods. | ||
The goal is to provide an API that is 100% identical to | ||
[node's Buffer API](http://nodejs.org/api/buffer.html). Read the | ||
[official docs](http://nodejs.org/api/buffer.html) for the full list of properties, | ||
instance methods, and class methods that are supported. | ||
## features | ||
- Backed by Typed Arrays (`Uint8Array` and `ArrayBuffer`) (not `Object`, so it's fast) | ||
- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) | ||
- Extremely small bundle size (**5.04KB minified + gzipped**, 35.5KB with comments) | ||
- Excellent browser support (IE 6+, Chrome 4+, Firefox 3+, Safari 5.1+, Opera 11+, iOS, etc.) | ||
- Preserves Node API exactly, with one important difference (see below) | ||
- Faster pretty much across the board (see perf results below) | ||
- `.slice()` returns instances of the same type (Buffer) | ||
- Square-bracket `buf[4]` notation works, even in old browsers like IE6! | ||
- Does not modify any browser prototypes or put anything on `window`. | ||
- Comprehensive test suite. | ||
- Does not modify any browser prototypes or put anything on `window` | ||
- Comprehensive test suite | ||
@@ -29,3 +29,3 @@ | ||
If you want to use this module directly without browserify, install it: | ||
To use this module directly (without browserify), install it: | ||
@@ -42,14 +42,20 @@ ```bash | ||
As mentioned before, when you `require('buffer')` or use the `Buffer` global in [browserify](http://github.com/substack/node-browserify), this module will automatically | ||
be included in your bundle so you get a `Buffer` API that actually works in the browser. | ||
The module's API is identical to node's `Buffer` API. Read the | ||
[official docs](http://nodejs.org/api/buffer.html) for the full list of properties, | ||
instance methods, and class methods that are supported. | ||
If you're depending on this module explicitly, then require it like this: | ||
As mentioned above, `require('buffer')` or use the `Buffer` global with | ||
[browserify](http://browserify.org) and this module will automatically be included | ||
in your bundle. Almost any npm module will work in the browser, even if it assumes that | ||
the node `Buffer` API will be available. | ||
To depend on this module explicitly (without browserify), require it like this: | ||
```js | ||
var Buffer = require('buffer/').Buffer // use the npm module, not the core module! | ||
var Buffer = require('buffer/').Buffer // note: the trailing slash is important! | ||
``` | ||
The module's API is 100% identical to node's `Buffer` API. Read the | ||
[official docs](http://nodejs.org/api/buffer.html) for the full list of properties, | ||
instance methods, and class methods supported by `Buffer`. | ||
To require this module explicitly, use `require('buffer/')` which tells the node.js module | ||
lookup algorithm (also used by browserify) to use the **npm module** named `buffer` | ||
instead of the **node.js core** module named `buffer`! | ||
@@ -72,3 +78,3 @@ | ||
#### Minor: `buf.slice()` does not modify parent buffer's memory in all browsers | ||
#### Minor: `buf.slice()` does not modify parent buffer's memory in old browsers | ||
@@ -84,5 +90,14 @@ If you only support modern browsers (specifically, those with typed array support), then | ||
\* *Firefox older than version 30 gets the `Object` implementation -- not the typed arrays one -- because of [this | ||
bug](https://bugzilla.mozilla.org/show_bug.cgi?id=952403) that made it impossible to add properties to a typed array.* | ||
bug](https://bugzilla.mozilla.org/show_bug.cgi?id=952403) (now fixed!) that made it impossible to add properties to a typed array.* | ||
## tracking the latest node api | ||
This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer | ||
API is considered **stable** in the | ||
[node stability index](http://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), | ||
so it is unlikely that there will ever be breaking changes. | ||
Nonetheless, when/if the Buffer API changes in node, this module's API will change | ||
accordingly. | ||
## performance | ||
@@ -89,0 +104,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1270249
200