{"name":"to-primitive-x","version":"2.0.19","description":"Converts a JavaScript object to a primitive value.","homepage":"https://github.com/Xotic750/to-primitive-x","author":{"name":"Graham Fairweather","email":"xotic750@gmail.com"},"copyright":"Copyright (c) 2017","keywords":["toPrimitive","module","javascript","nodejs","browser"],"module":"dist/to-primitive-x.esm.js","main":"dist/to-primitive-x.js","scripts":{"build:esm":"mkdirp dist && babel -s true --env-name esm src/to-primitive-x.js -o dist/to-primitive-x.esm.js","build:base":"webpack --bail --progress --profile --colors","build":"npm run build:esm && cross-env NODE_ENV=production npm run build:base --","build:dev":"npm run build:base --","clean":"rimraf dist && npm run clean:coverage","clean:coverage":"rimraf __tests__/coverage","lint":"eslint -f 'node_modules/eslint-friendly-formatter' --ext .js .","lint-fix":"npm run lint -- --fix","report":"npm run build -- --env.report","report:dev":"npm run build:dev -- --env.report","security":"npm audit","security-fix":"npm run security -- fix","start":"nodemon --exec \"npm run build\" --watch src","test":"npm run clean:coverage && jest","test:ci":"npm run test -- --ci --maxWorkers=2","test:coverage":"npm run test -- --coverage"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Xotic750/to-primitive-x.git"},"bugs":{"url":"https://github.com/Xotic750/to-primitive-x/issues"},"dependencies":{"has-symbol-support-x":"^2.0.14","is-date-object":"^1.0.1","is-function-x":"^4.0.20","is-nil-x":"^2.0.18","is-primitive":"^3.0.1","is-symbol":"^1.0.2","require-object-coercible-x":"^2.0.19"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/node":"^7.5.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-syntax-export-default-from":"^7.2.0","@babel/plugin-syntax-export-namespace-from":"^7.2.0","@babel/plugin-transform-property-mutators":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/runtime":"^7.5.5","@prorenata/eslint-config-vue":"^1.13.10","@types/jest":"^24.0.15","@types/node":"^12.6.8","babel-core":"^7.0.0-0","babel-eslint":"^10.0.2","babel-loader":"^8.0.6","babel-plugin-lodash":"^3.3.4","caniuse-lite":"^1.0.30000985","chalk":"^2.4.2","concurrently":"^4.1.1","cross-env":"^5.2.0","eslint":"=5.16.0","eslint-config-airbnb-base":"^13.2.0","eslint-config-prettier":"^6.0.0","eslint-friendly-formatter":"^4.0.1","eslint-import-resolver-webpack":"^0.11.1","eslint-loader":"^2.2.1","eslint-plugin-babel":"^5.3.0","eslint-plugin-compat":"^3.3.0","eslint-plugin-css-modules":"^2.11.0","eslint-plugin-eslint-comments":"^3.1.2","eslint-plugin-html":"^6.0.0","eslint-plugin-import":"^2.18.2","eslint-plugin-jest":"^22.13.0","eslint-plugin-jsdoc":"^15.6.1","eslint-plugin-json":"^1.4.0","eslint-plugin-lodash":"^5.1.0","eslint-plugin-no-use-extend-native":"^0.4.1","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^3.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-sort-class-members":"^1.5.0","eslint-plugin-switch-case":"^1.1.2","eslint-plugin-vue":"^5.2.3","friendly-errors-webpack-plugin":"^1.7.0","identity-obj-proxy":"^3.0.0","jest":"^24.8.0","jest-cli":"^24.8.0","jest-file":"^1.0.0","jsdoc-to-markdown":"^5.0.0","lodash":"^4.17.15","lodash-webpack-plugin":"^0.11.5","mkdirp":"^0.5.1","node-notifier":"^5.4.0","nodemon":"^1.19.1","prettier":"=1.14.3","rimraf":"^2.6.3","semver":"^6.2.0","source-map-loader":"^0.2.4","strip-ansi":"^5.2.0","terser-webpack-plugin":"^1.3.0","typescript":"^3.5.3","webpack":"^4.36.1","webpack-bundle-analyzer":"^3.3.2","webpack-cli":"^3.3.6","webpack-merge":"^4.2.1"},"engines":{"node":">=8.11.4","npm":"6.10.1"},"browserslist":["> 1%","Explorer >= 9"],"gitHead":"94da2d5db9d31c2732b5e9f14ae2cde0b9dcc9e9","_id":"to-primitive-x@2.0.19","_npmVersion":"5.10.0","_nodeVersion":"8.11.4","_npmUser":{"name":"xotic750","email":"xotic750@gmail.com"},"dist":{"integrity":"sha512-k2ye2hLvhzz5/5qsBqSiFjxsshoyltfjfzoI/IFrjdUgicmiKIh1t74MNrnFn/y9Wo6s9N+DtzczHMjsJA1pJA==","shasum":"09debd7a06db76359298cec889b3dabbad7a9a5f","tarball":"http://registry-npm.ywwl.com/to-primitive-x/download/to-primitive-x-2.0.19.tgz","fileCount":10,"unpackedSize":161070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdNasUCRA9TVsSAnZWagAAMeoQAI8cxubBAbUiEONNUhlm\npJtjxn/mpx67S0xq1NqQa7xAFBOyJhsdbFu/jwbEVQDRv1ChgTqMLJ5f4l24\n5O7DjQbmmDh3P008ac2bTLYphtsMQzXhiPscp9yWOlK2gKpU0mU+zaH0d1V9\nYbJnLORo6D44voVTZP8LLKKtENb4u2uxswasYKcQ1n0awU76RYcfFACLFsWc\nrVpeMKYanQE5Eju/Wc3p8DGPMWnvm6bQr/kW9gO99ppK/x3eP6zKsXYrNXba\npB/yiHgW1BPPiREpSNwD5RZfvhEi0lJmjIwqER9LCN3Kowle2+u0lvq/GKcM\nKTP4HpMOnfPxdkJsrIjOziLrYN5k4fMh0+cBWL3+lwiLe+200AmqVZQTzr8S\n5dNlFkI+Dg8BDHSxeoWbmVmRzLmudFxsdfgTsQWfUQqt6jFM0cwpQ9gaVCYH\nCLVahEfYYVbXQ+JQEYgt9WpsWUVRVTHPEw7q3SEW9TA6OBJvzQgSsWy+99Nc\nsm4HJ9u1Qa7L0KHyyJ6mhZLYspbzZPTudkB+FZGR/GkphtG3+58JQ6szgYNx\nFzGbsWnU1oKWP7JM2jnIrhRYKrmr0ZZ/UsBWi0txYY0W5SMRJ0BwOGgBjppu\nd+m6T6uYEQ6vEo+El475/GFHXvB1tiNk1cHfASsuHokaUnKJWuhU9o0TCXk+\npWZz\r\n=ZyJB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGaPR4R93uOrsb+4AWMxkXJd4mwwQFWEBnubTilGSX97AiAr3j0aNLUlzuI/P51SQ/HhEtgKWoCAVcBwSE+NBt4lOw=="}],"size":37548,"noattachment":false,"key":"/to-primitive-x/-/to-primitive-x-2.0.19.tgz"},"maintainers":[{"name":"xotic750","email":"xotic750@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-primitive-x_2.0.19_1563798292079_0.026089497137633533"},"_hasShrinkwrap":false,"readme":"<a\n  href=\"https://travis-ci.org/Xotic750/to-primitive-x\"\n  title=\"Travis status\">\n<img\n  src=\"https://travis-ci.org/Xotic750/to-primitive-x.svg?branch=master\"\n  alt=\"Travis status\" height=\"18\">\n</a>\n<a\n  href=\"https://david-dm.org/Xotic750/to-primitive-x\"\n  title=\"Dependency status\">\n<img src=\"https://david-dm.org/Xotic750/to-primitive-x/status.svg\"\n  alt=\"Dependency status\" height=\"18\"/>\n</a>\n<a\n  href=\"https://david-dm.org/Xotic750/to-primitive-x?type=dev\"\n  title=\"devDependency status\">\n<img src=\"https://david-dm.org/Xotic750/to-primitive-x/dev-status.svg\"\n  alt=\"devDependency status\" height=\"18\"/>\n</a>\n<a\n  href=\"https://badge.fury.io/js/to-primitive-x\"\n  title=\"npm version\">\n<img src=\"https://badge.fury.io/js/to-primitive-x.svg\"\n  alt=\"npm version\" height=\"18\">\n</a>\n<a\n  href=\"https://www.jsdelivr.com/package/npm/to-primitive-x\"\n  title=\"jsDelivr hits\">\n<img src=\"https://data.jsdelivr.com/v1/package/npm/to-primitive-x/badge?style=rounded\"\n  alt=\"jsDelivr hits\" height=\"18\">\n</a>\n<a\n  href=\"https://bettercodehub.com/results/Xotic750/to-primitive-x\"\n  title=\"bettercodehub score\">\n<img src=\"https://bettercodehub.com/edge/badge/Xotic750/to-primitive-x?branch=master\"\n  alt=\"bettercodehub score\" height=\"18\">\n</a>\n<a\n  href=\"https://coveralls.io/github/Xotic750/to-primitive-x?branch=master\"\n  title=\"Coverage Status\">\n<img src=\"https://coveralls.io/repos/github/Xotic750/to-primitive-x/badge.svg?branch=master\"\n  alt=\"Coverage Status\" height=\"18\">\n</a>\n\n<a name=\"module_to-primitive-x\"></a>\n\n## to-primitive-x\n\nConverts a JavaScript object to a primitive value.\n\n<a name=\"exp_module_to-primitive-x--module.exports\"></a>\n\n### `module.exports(input, [prefferedtype])` ⇒ <code>string</code> \\| <code>number</code> ⏏\n\nThis method converts a JavaScript object to a primitive value.\nNote: When toPrimitive is called with no hint, then it generally behaves as\nif the hint were Number. However, objects may over-ride this behaviour by\ndefining a @@toPrimitive method. Of the objects defined in this specification\nonly Date objects (see 20.3.4.45) and Symbol objects (see 19.4.3.4) over-ride\nthe default ToPrimitive behaviour. Date objects treat no hint as if the hint\nwere String.\n\n**Kind**: Exported function  \n**Returns**: <code>string</code> \\| <code>number</code> - The converted input as a primitive.  \n**Throws**:\n\n- <code>TypeError</code> If unable to convert input to a primitive.\n\n| Param           | Type                     | Description                            |\n| --------------- | ------------------------ | -------------------------------------- |\n| input           | <code>\\*</code>          | The input to convert.                  |\n| [prefferedtype] | <code>constructor</code> | The preffered type (String or Number). |\n\n**Example**\n\n```js\nimport toPrimitive from 'to-primitive-x';\n\nconst date = new Date(0);\nconsole.log(toPrimitive(date)); // Thu Jan 01 1970 01:00:00 GMT+0100 (CET)\nconsole.log(toPrimitive(date, String)); // Thu Jan 01 1970 01:00:00 GMT+0100 (CET)\nconsole.log(toPrimitive(date, Number)); // 0\n```\n","publish_time":1563798292266,"_cnpm_publish_time":1563798292266,"dist-tags":{"latest":"2.1.2"}}