twgl.js 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @license twgl.js 5.0.3 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
+ * @license twgl.js 5.0.4 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
3
3
  * Available via the MIT license.
4
4
  * see: http://github.com/greggman/twgl.js for details
5
5
  */
@@ -1514,6 +1514,8 @@ exports.isShader = isShader;
1514
1514
  exports.isTexture = isTexture;
1515
1515
  exports.isSampler = isSampler;
1516
1516
 
1517
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1518
+
1517
1519
  /*
1518
1520
  * Copyright 2019 Gregg Tavares
1519
1521
  *
@@ -1588,7 +1590,7 @@ function warn() {
1588
1590
  var isTypeWeakMaps = new Map();
1589
1591
 
1590
1592
  function isType(object, type) {
1591
- if (!object) {
1593
+ if (!object || _typeof(object) !== 'object') {
1592
1594
  return false;
1593
1595
  }
1594
1596
 
@@ -1,4 +1,4 @@
1
- /* @license twgl.js 5.0.3 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
1
+ /* @license twgl.js 5.0.4 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
2
  Available via the MIT license.
3
3
  see: http://github.com/greggman/twgl.js for details */
4
4
  /*
@@ -1952,7 +1952,7 @@ function warn(...args) {
1952
1952
  const isTypeWeakMaps = new Map();
1953
1953
 
1954
1954
  function isType(object, type) {
1955
- if (!object) {
1955
+ if (!object || typeof object !== 'object') {
1956
1956
  return false;
1957
1957
  }
1958
1958
  let weakMap = isTypeWeakMaps.get(type);
package/dist/5.x/twgl.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @license twgl.js 5.0.3 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
2
+ * @license twgl.js 5.0.4 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
3
3
  * Available via the MIT license.
4
4
  * see: http://github.com/greggman/twgl.js for details
5
5
  */
@@ -1514,6 +1514,8 @@ exports.isShader = isShader;
1514
1514
  exports.isTexture = isTexture;
1515
1515
  exports.isSampler = isSampler;
1516
1516
 
1517
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1518
+
1517
1519
  /*
1518
1520
  * Copyright 2019 Gregg Tavares
1519
1521
  *
@@ -1588,7 +1590,7 @@ function warn() {
1588
1590
  var isTypeWeakMaps = new Map();
1589
1591
 
1590
1592
  function isType(object, type) {
1591
- if (!object) {
1593
+ if (!object || _typeof(object) !== 'object') {
1592
1594
  return false;
1593
1595
  }
1594
1596
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twgl.js",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "A Tiny WebGL helper library",
5
5
  "main": "dist/5.x/twgl-full.js",
6
6
  "types": "dist/5.x/twgl-full.d.ts",