Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Allow use with ArrayBufferView #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions jspack.js
@@ -1,5 +1,5 @@
/*! /*!
* Copyright � 2008 Fair Oaks Labs, Inc. * Copyright � 2008 Fair Oaks Labs, Inc.
* All rights reserved. * All rights reserved.
*/ */


Expand All @@ -12,8 +12,9 @@ function JSPack()


// Raw byte arrays // Raw byte arrays
m._DeArray = function (a, p, l) m._DeArray = function (a, p, l)
{ {
return [a.slice(p,p+l)]; var slice = a.subarray ? 'subarray' : 'slice';
return [a[slice](p,p+l)];
}; };
m._EnArray = function (a, p, l, v) m._EnArray = function (a, p, l, v)
{ {
Expand Down