twgl.js 5.0.2 → 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.2 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,6 +1590,10 @@ function warn() {
1588
1590
  var isTypeWeakMaps = new Map();
1589
1591
 
1590
1592
  function isType(object, type) {
1593
+ if (!object || _typeof(object) !== 'object') {
1594
+ return false;
1595
+ }
1596
+
1591
1597
  var weakMap = isTypeWeakMaps.get(type);
1592
1598
 
1593
1599
  if (!weakMap) {
@@ -1,4 +1,4 @@
1
- /* @license twgl.js 5.0.2 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,6 +1952,9 @@ function warn(...args) {
1952
1952
  const isTypeWeakMaps = new Map();
1953
1953
 
1954
1954
  function isType(object, type) {
1955
+ if (!object || typeof object !== 'object') {
1956
+ return false;
1957
+ }
1955
1958
  let weakMap = isTypeWeakMaps.get(type);
1956
1959
  if (!weakMap) {
1957
1960
  weakMap = new WeakMap();
package/dist/5.x/twgl.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @license twgl.js 5.0.2 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,6 +1590,10 @@ function warn() {
1588
1590
  var isTypeWeakMaps = new Map();
1589
1591
 
1590
1592
  function isType(object, type) {
1593
+ if (!object || _typeof(object) !== 'object') {
1594
+ return false;
1595
+ }
1596
+
1591
1597
  var weakMap = isTypeWeakMaps.get(type);
1592
1598
 
1593
1599
  if (!weakMap) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twgl.js",
3
- "version": "5.0.2",
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",