Dashboard sipadu mbip
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

wrap.js 563B

123456789101112131415
  1. 'use strict';
  2. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  3. module.exports = function wrap(value) {
  4. if (value instanceof this.constructor) {
  5. return value;
  6. }
  7. if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
  8. return new this.constructor(value);
  9. }
  10. return new this.constructor([value]);
  11. };