aboutsummaryrefslogtreecommitdiff
path: root/node_modules/pako/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/pako/lib/utils')
-rw-r--r--node_modules/pako/lib/utils/common.js5
-rw-r--r--node_modules/pako/lib/utils/strings.js6
2 files changed, 7 insertions, 4 deletions
diff --git a/node_modules/pako/lib/utils/common.js b/node_modules/pako/lib/utils/common.js
index 1e159fecb..58be4beb4 100644
--- a/node_modules/pako/lib/utils/common.js
+++ b/node_modules/pako/lib/utils/common.js
@@ -5,6 +5,9 @@ var TYPED_OK = (typeof Uint8Array !== 'undefined') &&
(typeof Uint16Array !== 'undefined') &&
(typeof Int32Array !== 'undefined');
+function _has(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
exports.assign = function (obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
@@ -17,7 +20,7 @@ exports.assign = function (obj /*from1, from2, from3, ...*/) {
}
for (var p in source) {
- if (source.hasOwnProperty(p)) {
+ if (_has(source, p)) {
obj[p] = source[p];
}
}
diff --git a/node_modules/pako/lib/utils/strings.js b/node_modules/pako/lib/utils/strings.js
index 1a0499c34..313c27b9b 100644
--- a/node_modules/pako/lib/utils/strings.js
+++ b/node_modules/pako/lib/utils/strings.js
@@ -8,7 +8,7 @@ var utils = require('./common');
// Quick check if we can use fast array to bin string conversion
//
// - apply(Array) can fail on Android 2.2
-// - apply(Uint8Array) can fail on iOS 5.1 Safary
+// - apply(Uint8Array) can fail on iOS 5.1 Safari
//
var STR_APPLY_OK = true;
var STR_APPLY_UIA_OK = true;
@@ -173,11 +173,11 @@ exports.utf8border = function (buf, max) {
pos = max - 1;
while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
- // Fuckup - very small and broken sequence,
+ // Very small and broken sequence,
// return max, because we should return something anyway.
if (pos < 0) { return max; }
- // If we came to start of buffer - that means vuffer is too small,
+ // If we came to start of buffer - that means buffer is too small,
// return max too.
if (pos === 0) { return max; }