]> zoso.dev Git - buffer.git/log
buffer.git
7 years ago5.0.7
Feross Aboukhadijeh [Sat, 5 Aug 2017 01:45:23 +0000 (18:45 -0700)]
5.0.7

7 years agoauthors
Feross Aboukhadijeh [Sat, 5 Aug 2017 01:40:33 +0000 (18:40 -0700)]
authors

7 years agoMerge pull request #170 from feross/arraybuffer-context
Feross Aboukhadijeh [Sat, 5 Aug 2017 01:37:18 +0000 (18:37 -0700)]
Merge pull request #170 from feross/arraybuffer-context

Treat ArrayBuffers from another context as valid

7 years agoTreat ArrayBuffers from another context as valid
Feross Aboukhadijeh [Fri, 4 Aug 2017 22:27:08 +0000 (15:27 -0700)]
Treat ArrayBuffers from another context as valid

Fixes: https://github.com/feross/buffer/issues/166
ArrayBuffers from another context (i.e. an iframe) do not pass the
`instanceof` check but they should be treated as valid.

7 years agoMerge pull request #165 from srsudar/arraybuffer-readme
Feross Aboukhadijeh [Fri, 4 Aug 2017 22:12:17 +0000 (15:12 -0700)]
Merge pull request #165 from srsudar/arraybuffer-readme

Add slice for converting to ArrayBuffer

7 years agoAdd slice for converting to ArrayBuffer
Sam Sudar [Sat, 1 Jul 2017 05:14:16 +0000 (22:14 -0700)]
Add slice for converting to ArrayBuffer

The .buffer property is an ArrayBuffer, but it is not necessarily the
same length as the original buffer. This adds further documentation to
the README to flesh out converting a Buffer to an ArrayBuffer.

7 years ago5.0.6
Feross Aboukhadijeh [Wed, 5 Apr 2017 19:05:09 +0000 (12:05 -0700)]
5.0.6

7 years agoadd back Number.isNaN shim for IE
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:51:52 +0000 (11:51 -0700)]
add back Number.isNaN shim for IE

7 years agoMerge pull request #159 from feross/improvements
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:37:06 +0000 (11:37 -0700)]
Merge pull request #159 from feross/improvements

support environments that lack ArrayBuffer.isView; remove old shims

7 years agoremove string.trim() shim
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:28:28 +0000 (11:28 -0700)]
remove string.trim() shim

7 years agouse `Number.isNaN` consistently
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:27:26 +0000 (11:27 -0700)]
use `Number.isNaN` consistently

7 years agosupport environments that lack ArrayBuffer.isView (Node 0.10)
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:24:52 +0000 (11:24 -0700)]
support environments that lack ArrayBuffer.isView (Node 0.10)

This helps browserify tests to pass

7 years agostandard
Feross Aboukhadijeh [Tue, 21 Mar 2017 02:31:37 +0000 (19:31 -0700)]
standard

7 years agoMerge pull request #158 from feross/readme
Feross Aboukhadijeh [Thu, 2 Mar 2017 08:13:05 +0000 (00:13 -0800)]
Merge pull request #158 from feross/readme

Add conversion instructions

7 years agoAdd conversion instructions
Feross Aboukhadijeh [Tue, 21 Feb 2017 08:04:49 +0000 (00:04 -0800)]
Add conversion instructions

Fixes: https://github.com/feross/buffer/issues/157
Also, removed `buffer-equals` from recommended list, since node 0.12 is
no longer a supported version.

7 years ago5.0.5
Feross Aboukhadijeh [Thu, 9 Feb 2017 22:11:27 +0000 (14:11 -0800)]
5.0.5

7 years agoMerge pull request #155 from feross/instanceof
Feross Aboukhadijeh [Thu, 9 Feb 2017 22:06:18 +0000 (23:06 +0100)]
Merge pull request #155 from feross/instanceof

Undo `instanceof Buffer` changes

7 years agoUndo `instanceof Buffer` changes
Feross Aboukhadijeh [Thu, 9 Feb 2017 22:01:59 +0000 (14:01 -0800)]
Undo `instanceof Buffer` changes

It turns out that it's not possible to use `instanceof Buffer` safely,
like I thought.

It's not possible to use `instanceof Buffer` reliably in a browserify
context because there could be multiple different copies of the
'buffer' package in use.

This previous method (checking `buf._isBuffer`) works even for Buffer
instances that were created from another copy of the `buffer` package.

NOTE: It's possible to have two different "instances" of the 'buffer'
package, even if the 'buffer' package appears only once in the bundled
code. This can happen if you require 'buffer' in different ways, for
example:

`require('buffer')` vs. `require('buffer/')` vs. using the implicit
`Buffer` global.

You can confirm this by browserifying this code:

```js
console.log(require('buffer').Buffer === require('buffer/').Buffer) //
will be false
```

So, for this reason, `instanceof` won't work.

7 years ago5.0.4
Feross Aboukhadijeh [Thu, 9 Feb 2017 05:14:00 +0000 (21:14 -0800)]
5.0.4

7 years agoMerge pull request #153 from feross/standard
Feross Aboukhadijeh [Thu, 9 Feb 2017 05:08:22 +0000 (06:08 +0100)]
Merge pull request #153 from feross/standard

Small fixes

7 years agoReplace `Buffer.isBuffer` with `instanceof Buffer`
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:38:10 +0000 (19:38 -0800)]
Replace `Buffer.isBuffer` with `instanceof Buffer`

It's one less function call, and we don't need to avoid `instanceof
Buffer` anymore because our Buffer is proper subclass of Uint8Array
now, instead of just an Uint8Array with the methods added on as
properties.

7 years agoremove 'typeof ArrayBuffer' checks
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:58 +0000 (19:25 -0800)]
remove 'typeof ArrayBuffer' checks

Since buffer v5 we don't support browsers that lack typed arrays

7 years agodownload: one less newline
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:29 +0000 (19:25 -0800)]
download: one less newline

7 years agofix bug caught by standard v9
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:20 +0000 (19:25 -0800)]
fix bug caught by standard v9

7 years agoremove unneeded property access
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:08 +0000 (19:25 -0800)]
remove unneeded property access

7 years agostandard
Feross Aboukhadijeh [Thu, 9 Feb 2017 01:02:06 +0000 (17:02 -0800)]
standard

7 years agostandard
Feross Aboukhadijeh [Thu, 9 Feb 2017 00:25:30 +0000 (16:25 -0800)]
standard

7 years ago5.0.3
Feross Aboukhadijeh [Thu, 2 Feb 2017 20:05:33 +0000 (12:05 -0800)]
5.0.3

7 years agocheck for console.error before using it (for IE5-7)
Feross Aboukhadijeh [Thu, 2 Feb 2017 20:00:48 +0000 (12:00 -0800)]
check for console.error before using it (for IE5-7)

Fixes: https://github.com/feross/buffer/issues/152
7 years agobrowserify@14
Feross Aboukhadijeh [Wed, 25 Jan 2017 04:58:29 +0000 (20:58 -0800)]
browserify@14

7 years agoremove old comment
Feross Aboukhadijeh [Tue, 24 Jan 2017 23:40:47 +0000 (15:40 -0800)]
remove old comment

8 years agoauthors
Feross Aboukhadijeh [Fri, 2 Dec 2016 23:09:56 +0000 (15:09 -0800)]
authors

8 years ago5.0.2
Feross Aboukhadijeh [Fri, 2 Dec 2016 23:06:02 +0000 (15:06 -0800)]
5.0.2

8 years agofix comment
Feross Aboukhadijeh [Fri, 2 Dec 2016 22:58:50 +0000 (14:58 -0800)]
fix comment

8 years agoMerge pull request #148 from adventure-yunfei/master
Feross Aboukhadijeh [Fri, 2 Dec 2016 22:57:38 +0000 (14:57 -0800)]
Merge pull request #148 from adventure-yunfei/master

adventure-yunfei fix: wrong overwritting of not writable Unit8Array.from

8 years agoMerge pull request #150 from feross/feross/cleanup
Feross Aboukhadijeh [Fri, 2 Dec 2016 22:51:33 +0000 (14:51 -0800)]
Merge pull request #150 from feross/feross/cleanup

Lots of little cleanup

8 years agodocs
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:50:24 +0000 (14:50 -0600)]
docs

8 years agotest: there is nothing after IE11
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:48:17 +0000 (14:48 -0600)]
test: there is nothing after IE11

8 years agotest: ES6 tests on Safari and iPhone
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:48:10 +0000 (14:48 -0600)]
test: ES6 tests on Safari and iPhone

8 years agotest: run ES6 tests on Edge
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:47:54 +0000 (14:47 -0600)]
test: run ES6 tests on Edge

8 years agotest: remove poly fill for Array.forEach, Array.map, Array.isArray
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:23:53 +0000 (14:23 -0600)]
test: remove poly fill for Array.forEach, Array.map, Array.isArray

We don’t support any browsers that don’t have these methods anymore

8 years agotest: remove checks for TYPED_ARRAY_SUPPORT
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:22:33 +0000 (14:22 -0600)]
test: remove checks for TYPED_ARRAY_SUPPORT

We only support browsers with typed arrays now, so this is a pointless
check.

8 years agoAdd bin/ to .npmignore
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:22:03 +0000 (14:22 -0600)]
Add bin/ to .npmignore

8 years agoremove useless file
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:21:51 +0000 (14:21 -0600)]
remove useless file

8 years agostandard fixes
Feross Aboukhadijeh [Tue, 22 Nov 2016 23:08:40 +0000 (20:08 -0300)]
standard fixes

8 years agoauthors
Feross Aboukhadijeh [Mon, 7 Nov 2016 08:13:44 +0000 (00:13 -0800)]
authors

8 years ago5.0.1
Feross Aboukhadijeh [Mon, 7 Nov 2016 08:04:00 +0000 (00:04 -0800)]
5.0.1

8 years agoMerge pull request #149 from emilbayes/master
Feross Aboukhadijeh [Mon, 7 Nov 2016 07:56:13 +0000 (23:56 -0800)]
Merge pull request #149 from emilbayes/master

Fix bug with .fill bytes > 127 from other encoding

8 years agoUpdate browser testing instructions
Emil Bay [Mon, 7 Nov 2016 07:45:38 +0000 (18:15 +1030)]
Update browser testing instructions

8 years agoFix Buffer => B, squash
Emil Bay [Mon, 7 Nov 2016 07:42:27 +0000 (18:12 +1030)]
Fix Buffer => B, squash

8 years agoFix bug with .fill bytes > 127 from other encoding
Emil Bay [Mon, 7 Nov 2016 07:25:57 +0000 (17:55 +1030)]
Fix bug with .fill bytes > 127 from other encoding

8 years agoadventure-yunfei fix: wrong overwritting of not writable Unit8Array.from
adventure-yunfei [Thu, 3 Nov 2016 08:27:13 +0000 (16:27 +0800)]
adventure-yunfei fix: wrong overwritting of not writable Unit8Array.from

8 years agoMerge pull request #146 from fanatid/create-buffer-style
Feross Aboukhadijeh [Mon, 17 Oct 2016 11:41:01 +0000 (12:41 +0100)]
Merge pull request #146 from fanatid/create-buffer-style

change style of condition in createBuffer

8 years agochange style of condition in createBuffer
Kirill Fomichev [Mon, 17 Oct 2016 09:45:45 +0000 (12:45 +0300)]
change style of condition in createBuffer

8 years agoadd missing uglify-js dev dep
Feross Aboukhadijeh [Thu, 29 Sep 2016 18:11:13 +0000 (11:11 -0700)]
add missing uglify-js dev dep

Used by the "npm run size" script

8 years agoMerge pull request #143 from jdalton/rm
Feross Aboukhadijeh [Tue, 27 Sep 2016 18:12:40 +0000 (20:12 +0200)]
Merge pull request #143 from jdalton/rm

Remove old browser note. [ci skip]

8 years agoRemove old browser note. [ci skip]
John-David Dalton [Tue, 27 Sep 2016 17:32:57 +0000 (10:32 -0700)]
Remove old browser note. [ci skip]

8 years agoreadme: update sizes
Feross Aboukhadijeh [Tue, 27 Sep 2016 03:50:58 +0000 (20:50 -0700)]
readme: update sizes

8 years agoauthors
Feross Aboukhadijeh [Tue, 27 Sep 2016 02:38:21 +0000 (19:38 -0700)]
authors

8 years ago5.0.0
Feross Aboukhadijeh [Tue, 27 Sep 2016 02:37:38 +0000 (19:37 -0700)]
5.0.0

8 years agoRemove unneeded `that` parameter
Feross Aboukhadijeh [Tue, 27 Sep 2016 02:11:31 +0000 (19:11 -0700)]
Remove unneeded `that` parameter

Thanks for pointing this out, @jdalton.

8 years agoAdd `enumerable` and `writable` descriptors.
John-David Dalton [Mon, 26 Sep 2016 20:51:04 +0000 (13:51 -0700)]
Add `enumerable` and `writable` descriptors.

8 years agoclean up typed array support detection
Feross Aboukhadijeh [Mon, 26 Sep 2016 19:37:27 +0000 (12:37 -0700)]
clean up typed array support detection

8 years agoConvert offsets to unsigned int consistently
Feross Aboukhadijeh [Mon, 26 Sep 2016 19:31:21 +0000 (12:31 -0700)]
Convert offsets to unsigned int consistently

As pointed out by @jdalton

8 years agoUpdate dot files.
John-David Dalton [Sat, 24 Sep 2016 02:43:04 +0000 (19:43 -0700)]
Update dot files.

8 years agoRemove object implementation tests
Feross Aboukhadijeh [Sat, 24 Sep 2016 01:59:08 +0000 (18:59 -0700)]
Remove object implementation tests

8 years agov5: Remove Object implementation
Feross Aboukhadijeh [Sat, 24 Sep 2016 01:53:27 +0000 (18:53 -0700)]
v5: Remove Object implementation

8 years agoRemove isarray dep.
John-David Dalton [Fri, 23 Sep 2016 18:04:42 +0000 (11:04 -0700)]
Remove isarray dep.

8 years agoMerge pull request #135 from feross/style
Feross Aboukhadijeh [Wed, 14 Sep 2016 19:55:14 +0000 (12:55 -0700)]
Merge pull request #135 from feross/style

style: Move prototype setup to right after Buffer constructor

8 years agostyle: Move prototype setup to right after Buffer constructor
Feross Aboukhadijeh [Wed, 14 Sep 2016 16:49:58 +0000 (09:49 -0700)]
style: Move prototype setup to right after Buffer constructor

8 years agochange standard ignore syntax
Feross Aboukhadijeh [Sat, 10 Sep 2016 19:32:14 +0000 (12:32 -0700)]
change standard ignore syntax

this has no meaningful effect at the moment, but if we add folders to
perf/ or test/node in the future, those subfolders will also be ignored

8 years agostandard
Feross Aboukhadijeh [Fri, 26 Aug 2016 01:56:24 +0000 (18:56 -0700)]
standard

8 years ago4.9.1
Feross Aboukhadijeh [Thu, 18 Aug 2016 03:46:29 +0000 (20:46 -0700)]
4.9.1

8 years agoMerge pull request #132 from feross/throw-negative
Feross Aboukhadijeh [Thu, 18 Aug 2016 03:42:02 +0000 (05:42 +0200)]
Merge pull request #132 from feross/throw-negative

sync tests; throw on negative .allocUnsafe() argument; remove hacks

8 years agothrow on negative .allocUnsafe() argument
Feross Aboukhadijeh [Thu, 18 Aug 2016 03:20:34 +0000 (20:20 -0700)]
throw on negative .allocUnsafe() argument

To match new behavior in node v6.4.0

https://github.com/nodejs/node/commit/8f90dcc1b8e4ac3d8597ea2ee3927f325c
c980d3

8 years agotest: sync node.js tests to master (node v6.4.0)
Feross Aboukhadijeh [Thu, 18 Aug 2016 03:19:46 +0000 (20:19 -0700)]
test: sync node.js tests to master (node v6.4.0)

8 years agotest: Remove assert hack
Feross Aboukhadijeh [Thu, 18 Aug 2016 02:28:41 +0000 (19:28 -0700)]
test: Remove assert hack

Bug in node.js core was fixed in node v6.4.0!

https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V6.m
d#6.4.0

8 years agohq standard badge
Feross Aboukhadijeh [Tue, 9 Aug 2016 01:00:29 +0000 (18:00 -0700)]
hq standard badge

8 years agofixpack
Feross Aboukhadijeh [Mon, 8 Aug 2016 20:59:58 +0000 (13:59 -0700)]
fixpack

8 years agoMerge pull request #129 from feross/AUTHORS
Feross Aboukhadijeh [Mon, 8 Aug 2016 20:59:20 +0000 (22:59 +0200)]
Merge pull request #129 from feross/AUTHORS

Add AUTHORS.md to thank contributors!

8 years agoAdd AUTHORS.md to thank contributors!
Feross Aboukhadijeh [Mon, 8 Aug 2016 20:59:07 +0000 (13:59 -0700)]
Add AUTHORS.md to thank contributors!

8 years ago4.9.0
Feross Aboukhadijeh [Mon, 8 Aug 2016 09:01:41 +0000 (02:01 -0700)]
4.9.0

8 years agoMerge pull request #128 from feross/typeof
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:56:40 +0000 (10:56 +0200)]
Merge pull request #128 from feross/typeof

Fix: Add missing "typeof"

8 years agoFix: Add missing "typeof"
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:53:07 +0000 (01:53 -0700)]
Fix: Add missing "typeof"

Without this, we never go down the faster native indexOf code-path. So
this wasn't causing bugs in user code, it was just probably slower than
necessary.

8 years agotest: undo removing iphone test
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:43:44 +0000 (01:43 -0700)]
test: undo removing iphone test

8 years agozuul: undo disabling latest firefox test
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:43:32 +0000 (01:43 -0700)]
zuul: undo disabling latest firefox test

8 years agoMerge pull request #127 from dcposch/dc/lastindexof
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:42:04 +0000 (10:42 +0200)]
Merge pull request #127 from dcposch/dc/lastindexof

Buffer.lastIndexOf

8 years ago4.8.0
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:28:48 +0000 (01:28 -0700)]
4.8.0

8 years agoMerge pull request #126 from feross/test-fixes
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:26:02 +0000 (10:26 +0200)]
Merge pull request #126 from feross/test-fixes

Update node.js tests and fix the bugs it caught

8 years agoBuffer.lastIndexOf
DC [Mon, 8 Aug 2016 07:49:02 +0000 (00:49 -0700)]
Buffer.lastIndexOf

8 years agoAdd explanatory comment
Feross Aboukhadijeh [Mon, 8 Aug 2016 08:16:12 +0000 (01:16 -0700)]
Add explanatory comment

In response to @dcposch's feedback

8 years agoHACK: test: add terrible hack to work around node.js assert bug
Feross Aboukhadijeh [Mon, 8 Aug 2016 05:10:05 +0000 (22:10 -0700)]
HACK: test: add terrible hack to work around node.js assert bug

Waiting for this issue to be fixed:
https://github.com/nodejs/node/issues/8001

8 years agoShow warning for unimplemented .lastIndexOf
Feross Aboukhadijeh [Mon, 8 Aug 2016 05:09:15 +0000 (22:09 -0700)]
Show warning for unimplemented .lastIndexOf

Instead of letting the Uint8Array implementation's .lastIndexOf be
exposed, since that one has a different interface.

8 years agoFix: buffer should only be as long as the valid part of a hex string
Feross Aboukhadijeh [Mon, 8 Aug 2016 05:08:39 +0000 (22:08 -0700)]
Fix: buffer should only be as long as the valid part of a hex string

Caught by the new node.js tests

8 years agoFix: treat numbers as unsigned 8-bit for .indexOf and .includes
Feross Aboukhadijeh [Mon, 8 Aug 2016 05:08:07 +0000 (22:08 -0700)]
Fix: treat numbers as unsigned 8-bit for .indexOf and .includes

Caught by the new node.js tests

8 years agotest: Update node.js tests from master
Feross Aboukhadijeh [Mon, 8 Aug 2016 05:07:20 +0000 (22:07 -0700)]
test: Update node.js tests from master

8 years agotest: remove typed array support check
Feross Aboukhadijeh [Mon, 8 Aug 2016 05:06:09 +0000 (22:06 -0700)]
test: remove typed array support check

The node.js tests are only run in browsers that support new ES6 syntax
(and all of those support typed arrays!)

8 years agofix node tests not running
Feross Aboukhadijeh [Sat, 6 Aug 2016 22:24:37 +0000 (15:24 -0700)]
fix node tests not running

8 years agofix node tests not running
Feross Aboukhadijeh [Sat, 6 Aug 2016 22:23:32 +0000 (15:23 -0700)]
fix node tests not running

8 years agoAdd 'latin1' encoding (alias for 'binary')
Feross Aboukhadijeh [Sat, 6 Aug 2016 22:16:46 +0000 (15:16 -0700)]
Add 'latin1' encoding (alias for 'binary')

https://github.com/nodejs/node/commit/54cc7212df320f1e489edf8dbeabb167a7
1cbe67