reshow-runtime
Advanced tools
Comparing version 0.16.2 to 0.16.3
@@ -0,1 +1,3 @@ | ||
import { T_UNDEFINED } from "reshow-constant"; | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||
@@ -32,5 +34,5 @@ try { | ||
_next(undefined); | ||
_next(T_UNDEFINED); | ||
}); | ||
}; | ||
} |
@@ -0,7 +1,9 @@ | ||
import _typeof from "reshow-runtime/es/helpers/typeof"; | ||
import { FUNCTION, UNDEFINED } from "reshow-constant"; | ||
import setPrototypeOf from "./setPrototypeOf"; | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === UNDEFINED || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
if ((typeof Proxy === "undefined" ? "undefined" : _typeof(Proxy)) === FUNCTION) return true; | ||
@@ -8,0 +10,0 @@ try { |
@@ -1,7 +0,9 @@ | ||
import unsupportedIterableToArray from "./unsupportedIterableToArray"; | ||
import _typeof from "reshow-runtime/es/helpers/typeof"; | ||
import { NUMBER, UNDEFINED, T_NULL, IS_ARRAY } from "reshow-constant"; | ||
import unsupportedIterableToArray, { NonIterableError } from "./unsupportedIterableToArray"; | ||
export default function _createForOfIteratorHelper(o, allowArrayLike) { | ||
var it; | ||
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { | ||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if ((typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) === UNDEFINED || o[Symbol.iterator] == T_NULL) { | ||
if (IS_ARRAY(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && _typeof(o.length) === NUMBER) { | ||
if (it) o = it; | ||
@@ -30,3 +32,3 @@ var i = 0; | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
throw new TypeError(NonIterableError); | ||
} | ||
@@ -33,0 +35,0 @@ |
@@ -1,7 +0,9 @@ | ||
import unsupportedIterableToArray from "./unsupportedIterableToArray"; | ||
import _typeof from "reshow-runtime/es/helpers/typeof"; | ||
import { NUMBER, UNDEFINED, T_NULL, IS_ARRAY } from "reshow-constant"; | ||
import unsupportedIterableToArray, { NonIterableError } from "./unsupportedIterableToArray"; | ||
export default function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it; | ||
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { | ||
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if ((typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) === UNDEFINED || o[Symbol.iterator] == T_NULL) { | ||
if (IS_ARRAY(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && _typeof(o.length) === NUMBER) { | ||
if (it) o = it; | ||
@@ -20,3 +22,3 @@ var i = 0; | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
throw new TypeError(NonIterableError); | ||
} | ||
@@ -23,0 +25,0 @@ |
@@ -0,1 +1,2 @@ | ||
import { T_UNDEFINED } from "reshow-constant"; | ||
export default function _defaults(obj, defaults) { | ||
@@ -8,3 +9,3 @@ var keys = Object.getOwnPropertyNames(defaults); | ||
if (value && value.configurable && obj[key] === undefined) { | ||
if (value && value.configurable && obj[key] === T_UNDEFINED) { | ||
Object.defineProperty(obj, key, value); | ||
@@ -11,0 +12,0 @@ } |
@@ -0,3 +1,5 @@ | ||
import { T_UNDEFINED, T_NULL } from "reshow-constant"; | ||
var get = function get(object, property, receiver) { | ||
if (object === null) { | ||
if (object === T_NULL) { | ||
object = Function.prototype; | ||
@@ -8,7 +10,7 @@ } | ||
if (desc === undefined) { | ||
if (desc === T_UNDEFINED) { | ||
var parent = Object.getPrototypeOf(object); | ||
if (parent === null) { | ||
return undefined; | ||
if (parent === T_NULL) { | ||
return T_UNDEFINED; | ||
} else { | ||
@@ -22,4 +24,4 @@ return get(parent, property, receiver); | ||
if (getter === undefined) { | ||
return undefined; | ||
if (getter === T_UNDEFINED) { | ||
return T_UNDEFINED; | ||
} | ||
@@ -26,0 +28,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { STRING, OBJECT, FUNCTION, UNDEFINED } from "reshow-constant"; | ||
var types = "|number|boolean|" + STRING + "|" + OBJECT + "|" + FUNCTION + "|" + UNDEFINED + "|"; | ||
import { NUMBER, STRING, OBJECT, FUNCTION, UNDEFINED } from "reshow-constant"; | ||
var types = "|boolean|" + NUMBER + "|" + STRING + "|" + OBJECT + "|" + FUNCTION + "|" + UNDEFINED + "|"; | ||
/** | ||
@@ -4,0 +4,0 @@ * Do not use this. |
@@ -0,5 +1,7 @@ | ||
import _typeof from "reshow-runtime/es/helpers/typeof"; | ||
import { FUNCTION, UNDEFINED } from "reshow-constant"; | ||
export default function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === UNDEFINED || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
if ((typeof Proxy === "undefined" ? "undefined" : _typeof(Proxy)) === FUNCTION) return true; | ||
@@ -6,0 +8,0 @@ try { |
@@ -0,3 +1,4 @@ | ||
import { UNDEFINED, T_NULL } from "reshow-constant"; | ||
export default function _objectDestructuringEmpty(obj) { | ||
if (obj == null) throw new TypeError("Cannot destructure undefined"); | ||
if (obj == T_NULL) throw new TypeError("Cannot destructure " + UNDEFINED); | ||
} |
import arrayLikeToArray from "./arrayLikeToArray"; | ||
var NonIterableError = "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."; | ||
export default function _unsupportedIterableToArray(o, minLen) { | ||
@@ -9,2 +10,3 @@ if (!o) return; | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | ||
} | ||
} | ||
export { NonIterableError }; |
@@ -8,2 +8,4 @@ "use strict"; | ||
var _reshowConstant = require("reshow-constant"); | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||
@@ -40,3 +42,3 @@ try { | ||
_next(undefined); | ||
_next(_reshowConstant.T_UNDEFINED); | ||
}); | ||
@@ -43,0 +45,0 @@ }; |
@@ -10,8 +10,12 @@ "use strict"; | ||
var _typeof2 = _interopRequireDefault(require("reshow-runtime/helpers/typeof")); | ||
var _reshowConstant = require("reshow-constant"); | ||
var _setPrototypeOf = _interopRequireDefault(require("./setPrototypeOf")); | ||
function isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2["default"])(Reflect)) === _reshowConstant.UNDEFINED || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
if ((typeof Proxy === "undefined" ? "undefined" : (0, _typeof2["default"])(Proxy)) === _reshowConstant.FUNCTION) return true; | ||
@@ -18,0 +22,0 @@ try { |
"use strict"; | ||
var _interopRequireWildcard = require("reshow-runtime/helpers/interopRequireWildcard"); | ||
var _interopRequireDefault = require("reshow-runtime/helpers/interopRequireDefault"); | ||
@@ -10,9 +12,13 @@ | ||
var _unsupportedIterableToArray = _interopRequireDefault(require("./unsupportedIterableToArray")); | ||
var _typeof2 = _interopRequireDefault(require("reshow-runtime/helpers/typeof")); | ||
var _reshowConstant = require("reshow-constant"); | ||
var _unsupportedIterableToArray = _interopRequireWildcard(require("./unsupportedIterableToArray")); | ||
function _createForOfIteratorHelper(o, allowArrayLike) { | ||
var it; | ||
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { | ||
if (Array.isArray(o) || (it = (0, _unsupportedIterableToArray["default"])(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if ((typeof Symbol === "undefined" ? "undefined" : (0, _typeof2["default"])(Symbol)) === _reshowConstant.UNDEFINED || o[Symbol.iterator] == _reshowConstant.T_NULL) { | ||
if ((0, _reshowConstant.IS_ARRAY)(o) || (it = (0, _unsupportedIterableToArray["default"])(o)) || allowArrayLike && o && (0, _typeof2["default"])(o.length) === _reshowConstant.NUMBER) { | ||
if (it) o = it; | ||
@@ -41,3 +47,3 @@ var i = 0; | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
throw new TypeError(_unsupportedIterableToArray.NonIterableError); | ||
} | ||
@@ -44,0 +50,0 @@ |
"use strict"; | ||
var _interopRequireWildcard = require("reshow-runtime/helpers/interopRequireWildcard"); | ||
var _interopRequireDefault = require("reshow-runtime/helpers/interopRequireDefault"); | ||
@@ -10,9 +12,13 @@ | ||
var _unsupportedIterableToArray = _interopRequireDefault(require("./unsupportedIterableToArray")); | ||
var _typeof2 = _interopRequireDefault(require("reshow-runtime/helpers/typeof")); | ||
var _reshowConstant = require("reshow-constant"); | ||
var _unsupportedIterableToArray = _interopRequireWildcard(require("./unsupportedIterableToArray")); | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it; | ||
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { | ||
if (Array.isArray(o) || (it = (0, _unsupportedIterableToArray["default"])(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if ((typeof Symbol === "undefined" ? "undefined" : (0, _typeof2["default"])(Symbol)) === _reshowConstant.UNDEFINED || o[Symbol.iterator] == _reshowConstant.T_NULL) { | ||
if ((0, _reshowConstant.IS_ARRAY)(o) || (it = (0, _unsupportedIterableToArray["default"])(o)) || allowArrayLike && o && (0, _typeof2["default"])(o.length) === _reshowConstant.NUMBER) { | ||
if (it) o = it; | ||
@@ -31,3 +37,3 @@ var i = 0; | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
throw new TypeError(_unsupportedIterableToArray.NonIterableError); | ||
} | ||
@@ -34,0 +40,0 @@ |
@@ -8,2 +8,4 @@ "use strict"; | ||
var _reshowConstant = require("reshow-constant"); | ||
function _defaults(obj, defaults) { | ||
@@ -16,3 +18,3 @@ var keys = Object.getOwnPropertyNames(defaults); | ||
if (value && value.configurable && obj[key] === undefined) { | ||
if (value && value.configurable && obj[key] === _reshowConstant.T_UNDEFINED) { | ||
Object.defineProperty(obj, key, value); | ||
@@ -19,0 +21,0 @@ } |
@@ -8,4 +8,6 @@ "use strict"; | ||
var _reshowConstant = require("reshow-constant"); | ||
var get = function get(object, property, receiver) { | ||
if (object === null) { | ||
if (object === _reshowConstant.T_NULL) { | ||
object = Function.prototype; | ||
@@ -16,7 +18,7 @@ } | ||
if (desc === undefined) { | ||
if (desc === _reshowConstant.T_UNDEFINED) { | ||
var parent = Object.getPrototypeOf(object); | ||
if (parent === null) { | ||
return undefined; | ||
if (parent === _reshowConstant.T_NULL) { | ||
return _reshowConstant.T_UNDEFINED; | ||
} else { | ||
@@ -30,4 +32,4 @@ return get(parent, property, receiver); | ||
if (getter === undefined) { | ||
return undefined; | ||
if (getter === _reshowConstant.T_UNDEFINED) { | ||
return _reshowConstant.T_UNDEFINED; | ||
} | ||
@@ -34,0 +36,0 @@ |
@@ -10,3 +10,3 @@ "use strict"; | ||
var types = "|number|boolean|" + _reshowConstant.STRING + "|" + _reshowConstant.OBJECT + "|" + _reshowConstant.FUNCTION + "|" + _reshowConstant.UNDEFINED + "|"; | ||
var types = "|boolean|" + _reshowConstant.NUMBER + "|" + _reshowConstant.STRING + "|" + _reshowConstant.OBJECT + "|" + _reshowConstant.FUNCTION + "|" + _reshowConstant.UNDEFINED + "|"; | ||
/** | ||
@@ -13,0 +13,0 @@ * Do not use this. |
"use strict"; | ||
var _interopRequireDefault = require("reshow-runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -8,6 +10,10 @@ value: true | ||
var _typeof2 = _interopRequireDefault(require("reshow-runtime/helpers/typeof")); | ||
var _reshowConstant = require("reshow-constant"); | ||
function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if ((typeof Reflect === "undefined" ? "undefined" : (0, _typeof2["default"])(Reflect)) === _reshowConstant.UNDEFINED || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
if ((typeof Proxy === "undefined" ? "undefined" : (0, _typeof2["default"])(Proxy)) === _reshowConstant.FUNCTION) return true; | ||
@@ -14,0 +20,0 @@ try { |
@@ -8,6 +8,8 @@ "use strict"; | ||
var _reshowConstant = require("reshow-constant"); | ||
function _objectDestructuringEmpty(obj) { | ||
if (obj == null) throw new TypeError("Cannot destructure undefined"); | ||
if (obj == _reshowConstant.T_NULL) throw new TypeError("Cannot destructure " + _reshowConstant.UNDEFINED); | ||
} | ||
module.exports = exports.default; |
@@ -8,2 +8,3 @@ "use strict"; | ||
}); | ||
exports.NonIterableError = void 0; | ||
exports["default"] = _unsupportedIterableToArray; | ||
@@ -13,2 +14,5 @@ | ||
var NonIterableError = "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."; | ||
exports.NonIterableError = NonIterableError; | ||
function _unsupportedIterableToArray(o, minLen) { | ||
@@ -21,4 +25,2 @@ if (!o) return; | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0, _arrayLikeToArray["default"])(o, minLen); | ||
} | ||
module.exports = exports.default; | ||
} |
{ | ||
"name": "reshow-runtime", | ||
"version": "0.16.2", | ||
"version": "0.16.3", | ||
"description": "Babel runtime alternative", | ||
@@ -5,0 +5,0 @@ "repository": "react-atomic/reshow", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58348
1620