{"_id":"string.prototype.towellformed","_rev":"2-79c66c263cdf7ee83c07d2716dff23ff","name":"string.prototype.towellformed","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"string.prototype.towellformed","version":"1.0.0","description":"An ESnext spec-compliant `String.prototype.toWellFormed` shim/polyfill/replacement that works as far down as ES3.","main":"index.js","exports":{".":[{"import":"./index.mjs","require":"./index.js","default":"./index.js"},"./index.js"],"./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound","tests-only":"nyc tape 'test/**/*.js'","tests-esm":"nyc node test/index.mjs","test":"npm run tests-only && npm run tests-esm","posttest":"aud --production","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+https://github.com/es-shims/String.prototype.toWellFormed.git"},"keywords":["javascript","ecmascript","polyfill","shim","es-shim API","unicode","string","surrogate","pair","well-formed","String.prototype.toWellFormed"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/String.prototype.toWellFormed/issues"},"homepage":"https://github.com/es-shims/String.prototype.toWellFormed#readme","devDependencies":{"@es-shims/api":"^2.2.3","@ljharb/eslint-config":"^21.0.0","aud":"^2.0.1","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","functions-have-names":"^1.2.3","has-strict-mode":"^1.0.1","in-publish":"^2.0.1","npmignore":"^0.3.0","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.6.1"},"dependencies":{"call-bind":"^1.0.2","define-properties":"^1.1.4","es-abstract":"^1.20.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"e8b4ea541e32b6e1d65009e609a0b6556408f23e","_id":"string.prototype.towellformed@1.0.0","_nodeVersion":"19.0.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-W98IPYw6xG7OhGvwihHarFXHX4ziKrIEN7rgCzxHx2XyTBOzZ7J7Q4pgIn1CpudYVLqlTb7x9wxQHr9GWxVwKA==","shasum":"c0229057af9e3418a8c1675b2b0f43bcc8e2ed40","tarball":"https://registry.npmjs.org/string.prototype.towellformed/-/string.prototype.towellformed-1.0.0.tgz","fileCount":17,"unpackedSize":17317,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDgZ4Hq0yeSM9nE3qnajliVlIz5c0fO5p1IJPzeZv+1PAiBSdEMwvKnkMtJWpmgyHFr31b1AZhSRom9tNjiCd+CzCQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjh18iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo4Jg//ZfBQddQq5H3/6lJopCqUBKngj6MIsxXEibXkaiCJvJdlEly1\r\nYLfKAPdfm+mct+PedocCL5pFmq7q1cH5Do1Dm9Sk9VIY63D9VAzGnL48E8ey\r\ndTH71oNH2AIxSURiaR3TL7IsZuCJXIJuq6Pm+ZGa2KOxYTXjGfdih0GvL4eg\r\nizA78uFBQYg27R/oHf1pIiwx1pncZfVxe15jR7BC+VKc2YDj4EA2zkufDfdk\r\nNOJIm2jua5ChwyOJkin6FE9F8Jitp4HD6iP0aDGeL83WYhXdGHz1euZqAhF3\r\nGngbO/UfPdAcwohpVqzIMeOaKj2KIZn+eql/uE/0zbxcfk3btL41miUsNAlE\r\ndqK9IbmqNDh5OSj5nbhabs3GWYqXnvOlZsDmnu2NuIR/etCE05SkwRjvH0it\r\nVtOz55kOP31lqhNcg7rPU4PkfqoxPuVsxnngsf9CzDcDqPHtdD19QaVg+IGc\r\n8+y25DKO5vHhw1fn8I7TMFKhkGofLbRWezxvyulBfelj8RxMd/s6gtXDUgmE\r\nbK2Z1hV1UxykH9cE5glZXMIv5dYcOaBX3PnfD3Ea4WDnP1TlxkotI7lDmPOZ\r\nv33YLEU24i+Dn2tbq6fWdxTvZsl9rUj9KKpn58+IsUavmJcrKmspOCxLZikK\r\nOOEu7j1/xCTuSgjwjFXqEtsi1NwPUAtD9eY=\r\n=lLtr\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string.prototype.towellformed_1.0.0_1669816098657_0.6271871646241243"},"_hasShrinkwrap":false},"1.0.1":{"name":"string.prototype.towellformed","version":"1.0.1","description":"An ESnext spec-compliant `String.prototype.toWellFormed` shim/polyfill/replacement that works as far down as ES3.","main":"index.js","exports":{".":[{"import":"./index.mjs","require":"./index.js","default":"./index.js"},"./index.js"],"./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound","tests-only":"nyc tape 'test/**/*.js'","tests-esm":"nyc node test/index.mjs","test":"npm run tests-only && npm run tests-esm","posttest":"aud --production","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+https://github.com/es-shims/String.prototype.toWellFormed.git"},"keywords":["javascript","ecmascript","polyfill","shim","es-shim API","unicode","string","surrogate","pair","well-formed","String.prototype.toWellFormed"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/String.prototype.toWellFormed/issues"},"homepage":"https://github.com/es-shims/String.prototype.toWellFormed#readme","devDependencies":{"@es-shims/api":"^2.4.2","@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","functions-have-names":"^1.2.3","has-bigints":"^1.0.2","has-strict-mode":"^1.0.1","has-symbols":"^1.0.3","in-publish":"^2.0.1","mock-property":"^1.0.0","npmignore":"^0.3.0","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.6.6"},"dependencies":{"call-bind":"^1.0.2","define-properties":"^1.2.0","es-abstract":"^1.22.1"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"string.prototype.towellformed@1.0.1","gitHead":"559330d21a2726674572038836cd44c2e1637dfb","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-aFHgCUEKBD4EypIHuJWr6Gbi9Pj5anyG/hdPVbRhkMDb4k1/TZZxX1u6OCkKzh7HTl0gUsII20ORqoA/C/TpBg==","shasum":"a09bf94b8ef54bdd0d69b98a5754aee1ab6c89f6","tarball":"https://registry.npmjs.org/string.prototype.towellformed/-/string.prototype.towellformed-1.0.1.tgz","fileCount":17,"unpackedSize":20036,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGc6BBQEbdGbZzCYIWOclnoDIG7f5AmKkbqvXSQlOiDQIhAKV9l/mSUm+Hj4tWU2F5T5Ze9v0a7IY2Qcgl+2WU1twX"}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string.prototype.towellformed_1.0.1_1693424471898_0.5739817262357649"},"_hasShrinkwrap":false},"1.0.2":{"name":"string.prototype.towellformed","version":"1.0.2","description":"An ESnext spec-compliant `String.prototype.toWellFormed` shim/polyfill/replacement that works as far down as ES3.","main":"index.js","exports":{".":"./index.js","./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"directories":{"test":"test"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run lint","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","posttest":"aud --production","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+https://github.com/es-shims/String.prototype.toWellFormed.git"},"keywords":["javascript","ecmascript","polyfill","shim","es-shim API","unicode","string","surrogate","pair","well-formed","String.prototype.toWellFormed"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/String.prototype.toWellFormed/issues"},"homepage":"https://github.com/es-shims/String.prototype.toWellFormed#readme","devDependencies":{"@es-shims/api":"^2.4.2","@ljharb/eslint-config":"^21.1.0","aud":"^2.0.4","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","functions-have-names":"^1.2.3","has-bigints":"^1.0.2","has-strict-mode":"^1.0.1","has-symbols":"^1.0.3","in-publish":"^2.0.1","mock-property":"^1.0.3","npmignore":"^0.3.1","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.7.5"},"dependencies":{"call-bind":"^1.0.7","define-properties":"^1.2.1","es-abstract":"^1.23.2","es-object-atoms":"^1.0.0"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"engines":{"node":">= 0.4"},"_id":"string.prototype.towellformed@1.0.2","gitHead":"591e5971d2a428a9bb400014785cb061b4bc3b3a","_nodeVersion":"21.7.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-qusT1OKg083o5gTeUI86HywOMABeJWWbcC936o/TXnzXE6VEQo23S5a2JIzd2pWeS8N3aNUWDOxwTIsrJTTJug==","shasum":"67e1829fa3eb193eb9774723f85553ae28bf8d29","tarball":"https://registry.npmjs.org/string.prototype.towellformed/-/string.prototype.towellformed-1.0.2.tgz","fileCount":15,"unpackedSize":19389,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZnZGNUJI778i1EMFJnvy+W2Kjkz7Bbjl5TjWAwk3H2gIhAIcUUdyDnjyMlvqOJHU0G7dV+1soytE8VeW+J/rJZ86O"}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string.prototype.towellformed_1.0.2_1710967683745_0.99543694899624"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-30T13:48:18.656Z","1.0.0":"2022-11-30T13:48:18.846Z","modified":"2024-03-20T20:48:04.552Z","1.0.1":"2023-08-30T19:41:12.050Z","1.0.2":"2024-03-20T20:48:03.910Z"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"description":"An ESnext spec-compliant `String.prototype.toWellFormed` shim/polyfill/replacement that works as far down as ES3.","homepage":"https://github.com/es-shims/String.prototype.toWellFormed#readme","keywords":["javascript","ecmascript","polyfill","shim","es-shim API","unicode","string","surrogate","pair","well-formed","String.prototype.toWellFormed"],"repository":{"type":"git","url":"git+https://github.com/es-shims/String.prototype.toWellFormed.git"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"bugs":{"url":"https://github.com/es-shims/String.prototype.toWellFormed/issues"},"license":"MIT","readme":"# string.prototype.towellformed <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\nAn ESnext spec-compliant `String.prototype.toWellFormed` shim/polyfill/replacement that works as far down as ES3.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the expected ES2024 [spec](https://tc39.es/proposal-is-usv-string/).\n\nBecause `String.prototype.toWellFormed` depends on a receiver (the `this` value), the main export takes the string to operate on as the first argument.\n\n## Getting started\n\n```sh\nnpm install --save string.prototype.towellformed\n```\n\n## Usage/Examples\n\n```js\nvar toWellFormed = require('string.prototype.towellformed');\nvar assert = require('assert');\n\nvar leadingPoo = '\\uD83D';\nvar trailingPoo = '\\uDCA9';\nvar wholePoo = leadingPoo + trailingPoo;\n\nvar replacementChar = '\\uFFFD';\n\nassert.equal(toWellFormed(wholePoo), wholePoo);\nassert.equal(toWellFormed(leadingPoo), replacementChar);\nassert.equal(toWellFormed(trailingPoo), replacementChar);\n```\n\n```js\nvar toWellFormed = require('string.prototype.towellformed');\nvar assert = require('assert');\n/* when String#toWellFormed is not present */\ndelete String.prototype.toWellFormed;\nvar shimmed = toWellFormed.shim();\n\nassert.equal(shimmed, toWellFormed.getPolyfill());\nassert.deepEqual(wholePoo.toWellFormed(), toWellFormed(wholePoo));\nassert.deepEqual(leadingPoo.toWellFormed(), toWellFormed(leadingPoo));\nassert.deepEqual(trailingPoo.toWellFormed(), toWellFormed(trailingPoo));\n```\n\n```js\nvar toWellFormed = require('string.prototype.towellformed');\nvar assert = require('assert');\n/* when String#at is present */\nvar shimmed = toWellFormed.shim();\n\nassert.equal(shimmed, String.prototype.toWellFormed);\nassert.deepEqual(wholePoo.toWellFormed(), toWellFormed(wholePoo));\nassert.deepEqual(leadingPoo.toWellFormed(), toWellFormed(leadingPoo));\nassert.deepEqual(trailingPoo.toWellFormed(), toWellFormed(trailingPoo));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/string.prototype.towellformed\n[npm-version-svg]: https://versionbadg.es/es-shims/String.prototype.toWellFormed.svg\n[deps-svg]: https://david-dm.org/es-shims/String.prototype.toWellFormed.svg\n[deps-url]: https://david-dm.org/es-shims/String.prototype.toWellFormed\n[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.toWellFormed/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.toWellFormed#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/string.prototype.towellformed.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/string.prototype.towellformed.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/string.prototype.towellformed.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.towellformed\n[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.toWellFormed/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.toWellFormed/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.toWellFormed\n[actions-url]: https://github.com/es-shims/String.prototype.toWellFormed/actions\n","readmeFilename":"README.md"}