mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-04 10:50:59 +01:00
Improve @std/esm compatibility, close #115
This commit is contained in:
parent
f2bcd09d95
commit
7238a449fb
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
1.0.6 / 2017-09-14
|
||||
------------------
|
||||
|
||||
- Improve @std/esm compatibility.
|
||||
|
||||
|
||||
1.0.5 / 2017-03-17
|
||||
------------------
|
||||
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue