Sha256: 6a30c7cf0338a69fa3fba62e8d07489f6322241fe7b2b5a1b53ca5f7dc59ac4e

Contents?: true

Size: 538 Bytes

Versions: 10

Compression:

Stored size: 538 Bytes

Contents

import _Symbol$toPrimitive from "../../core-js/symbol/to-primitive";
import _typeof from "../../helpers/esm/typeof";
export default 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);
}

Version data entries

10 entries across 10 versions & 1 rubygems

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