Permalink
Browse files

Allow use with ArrayBufferView

  • Loading branch information...
1 parent 4753fb1 commit 56e55d494e578238b9b932c393b100795f5d683f @mitchellrj committed Sep 22, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 jspack.js
View
@@ -1,5 +1,5 @@
/*!
- * Copyright © 2008 Fair Oaks Labs, Inc.
+ * Copyright 2008 Fair Oaks Labs, Inc.
* All rights reserved.
*/
@@ -12,8 +12,9 @@ function JSPack()
// Raw byte arrays
m._DeArray = function (a, p, l)
- {
- return [a.slice(p,p+l)];
+ {
+ var slice = a.subarray || a.slice;
+ return [slice(p,p+l)];
};
m._EnArray = function (a, p, l, v)
{

0 comments on commit 56e55d4

Please sign in to comment.