{"name":"es-to-primitive","version":"1.3.0","author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"description":"ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.","license":"MIT","main":"index.js","scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","tests-only":"nyc tape 'test/**/*.js'","lint":"eslint --ext=js,mjs .","postlint":"tsc && attw -P","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git://github.com/ljharb/es-to-primitive.git"},"keywords":["primitive","abstract","ecmascript","es5","es6","es2015","toPrimitive","coerce","type","object","string","number","boolean","symbol","null","undefined"],"dependencies":{"is-callable":"^1.2.7","is-date-object":"^1.0.5","is-symbol":"^1.0.4"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.0","@ljharb/eslint-config":"^21.1.1","@ljharb/tsconfig":"^0.2.0","@types/for-each":"^0.3.3","@types/function.prototype.name":"^1.1.3","@types/is-callable":"^1.1.2","@types/is-date-object":"^1.0.4","@types/is-symbol":"^1.0.2","@types/object-inspect":"^1.13.0","@types/object-is":"^1.1.0","@types/tape":"^5.6.4","auto-changelog":"^2.5.0","encoding":"^0.1.13","es-value-fixtures":"^1.5.0","eslint":"=8.8.0","for-each":"^0.3.3","function.prototype.name":"^1.1.6","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.3","object-is":"^1.1.6","safe-publish-latest":"^2.0.0","tape":"^5.9.0","typescript":"next"},"testling":{"files":"test/index.js"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true,"startingVersion":"1.2.2"},"publishConfig":{"ignore":[".github/workflows"]},"_id":"es-to-primitive@1.3.0","gitHead":"717f14a340bf0ab635eadc472cf1fe29a6c9240b","types":"./index.d.ts","bugs":{"url":"https://github.com/ljharb/es-to-primitive/issues"},"homepage":"https://github.com/ljharb/es-to-primitive#readme","_nodeVersion":"23.2.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==","shasum":"96c89c82cc49fd8794a24835ba3e1ff87f214e18","tarball":"http://registry-npm.ywwl.com/es-to-primitive/download/es-to-primitive-1.3.0.tgz","fileCount":23,"unpackedSize":44531,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwc33QjGDWvT1QUshC6HmKl9K/UgbbwMRMNXgrqdDUyAIhAKKrGt3TnZniRQZP3JfnZGaUEkj0r1lK4gTUZqqyaB6g"}],"size":10059,"noattachment":false,"key":"/es-to-primitive/-/es-to-primitive-1.3.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/es-to-primitive_1.3.0_1732646187387_0.5953143774878684"},"_hasShrinkwrap":false,"readme":"# es-to-primitive <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.\nWhen different versions of the spec conflict, the default export will be the latest version of the abstract operation.\nAlternative versions will also be available under an `es5`/`es2015` exported property if you require a specific version.\n\n## Example\n\n```js\nvar toPrimitive = require('es-to-primitive');\nvar assert = require('assert');\n\nassert(toPrimitive(function () {}) === String(function () {}));\n\nvar date = new Date();\nassert(toPrimitive(date) === String(date));\n\nassert(toPrimitive({ valueOf: function () { return 3; } }) === 3);\n\nassert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3]));\n\nvar sym = Symbol();\nassert(toPrimitive(Object(sym)) === sym);\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/es-to-primitive\n[npm-version-svg]: https://versionbadg.es/ljharb/es-to-primitive.svg\n[deps-svg]: https://david-dm.org/ljharb/es-to-primitive.svg\n[deps-url]: https://david-dm.org/ljharb/es-to-primitive\n[dev-deps-svg]: https://david-dm.org/ljharb/es-to-primitive/dev-status.svg\n[dev-deps-url]: https://david-dm.org/ljharb/es-to-primitive#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/es-to-primitive.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/es-to-primitive.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/es-to-primitive.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=es-to-primitive\n[codecov-image]: https://codecov.io/gh/ljharb/es-to-primitive/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/ljharb/es-to-primitive/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-to-primitive\n[actions-url]: https://github.com/ljharb/es-to-primitive/actions\n","publish_time":1732646187571,"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_cnpm_publish_time":1732646187571,"dist-tags":{"latest":"1.3.4"}}