7ca7a815ffcb4fef8f6529f2ed93ad91.json
2.6 KB
{"ast":null,"code":"var isObject = require('../internals/is-object'); // `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\n\n\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/core-js-pure/internals/to-primitive.js"],"names":["isObject","require","module","exports","input","PREFERRED_STRING","fn","val","toString","call","valueOf","TypeError"],"mappings":"AAAA,IAAIA,QAAQ,GAAGC,OAAO,CAAC,wBAAD,CAAtB,C,CAEA;AACA;AACA;AACA;;;AACAC,MAAM,CAACC,OAAP,GAAiB,UAAUC,KAAV,EAAiBC,gBAAjB,EAAmC;AAClD,MAAI,CAACL,QAAQ,CAACI,KAAD,CAAb,EAAsB,OAAOA,KAAP;AACtB,MAAIE,EAAJ,EAAQC,GAAR;AACA,MAAIF,gBAAgB,IAAI,QAAQC,EAAE,GAAGF,KAAK,CAACI,QAAnB,KAAgC,UAApD,IAAkE,CAACR,QAAQ,CAACO,GAAG,GAAGD,EAAE,CAACG,IAAH,CAAQL,KAAR,CAAP,CAA/E,EAAuG,OAAOG,GAAP;AACvG,MAAI,QAAQD,EAAE,GAAGF,KAAK,CAACM,OAAnB,KAA+B,UAA/B,IAA6C,CAACV,QAAQ,CAACO,GAAG,GAAGD,EAAE,CAACG,IAAH,CAAQL,KAAR,CAAP,CAA1D,EAAkF,OAAOG,GAAP;AAClF,MAAI,CAACF,gBAAD,IAAqB,QAAQC,EAAE,GAAGF,KAAK,CAACI,QAAnB,KAAgC,UAArD,IAAmE,CAACR,QAAQ,CAACO,GAAG,GAAGD,EAAE,CAACG,IAAH,CAAQL,KAAR,CAAP,CAAhF,EAAwG,OAAOG,GAAP;AACxG,QAAMI,SAAS,CAAC,yCAAD,CAAf;AACD,CAPD","sourcesContent":["var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n"]},"metadata":{},"sourceType":"script"}