Sha256: 41c85831ef3f6a33322bfc4c1960417234f88e50cda0c0b24a562f2e1fdcb71d

Contents?: true

Size: 553 Bytes

Versions: 10

Compression:

Stored size: 553 Bytes

Contents

var _Symbol$toPrimitive = require("../core-js/symbol/to-primitive");

var _typeof = require("../helpers/typeof");

function _toPrimitive(input, hint) {
  if (_typeof(input) !== "object" || input === null) return input;
  var prim = input[_Symbol$toPrimitive];

  if (prim !== undefined) {
    var res = prim.call(input, hint || "default");
    if (_typeof(res) !== "object") return res;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }

  return (hint === "string" ? String : Number)(input);
}

module.exports = _toPrimitive;

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
condenser-0.3 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.2 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.1 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.0.12 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.0.11 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.0.10 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.0.9 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.0.8 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.0.7 lib/condenser/processors/node_modules/@babel/runtime-corejs3/helpers/toPrimitive.js
condenser-0.0.5 lib/condenser/processors/node_modules/@babel/runtime-corejs2/helpers/toPrimitive.js