{"_id":"@besync/parse-entities-webworker","_rev":"2-8bde927fb0d8b14134e6bf88500df98e","name":"@besync/parse-entities-webworker","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@besync/parse-entities-webworker","publishConfig":{"access":"public"},"version":"2.0.0","description":"Parse HTML character references: fast, spec-compliant, positional information","license":"MIT","keywords":["parse","html","character","reference","entity","entities"],"repository":{"type":"git","url":"git+https://github.com/wooorm/parse-entities.git"},"bugs":{"url":"https://github.com/wooorm/parse-entities/issues"},"funding":{"type":"github","url":"https://github.com/sponsors/wooorm"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"browser-nonwebworker":{"./decode-entity.js":"./decode-entity.browser.js"},"react-native":{"./decode-entity.js":"./decode-entity.js"},"types":"types/index.d.ts","dependencies":{"character-entities":"^1.0.0","character-entities-legacy":"^1.0.0","character-reference-invalid":"^1.0.0","is-alphanumerical":"^1.0.0","is-decimal":"^1.0.0","is-hexadecimal":"^1.0.0"},"devDependencies":{"browserify":"^16.0.0","dtslint":"^2.0.0","nyc":"^15.0.0","prettier":"^1.0.0","remark-cli":"^7.0.0","remark-preset-wooorm":"^6.0.0","tape":"^4.0.0","tape-run":"^6.0.0","tinyify":"^2.0.0","xo":"^0.25.0"},"scripts":{"format":"remark . -qfo && prettier --write \"**/*.{js,ts}\" && xo --fix","build-bundle":"browserify . -s parseEntities > parse-entities.js","build-mangle":"browserify . -s parseEntities -p tinyify > parse-entities.min.js","build":"npm run build-bundle && npm run build-mangle","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test-browser":"browserify test.js | tape-run","test-types":"dtslint types","test":"npm run format && npm run build && npm run test-coverage && npm run test-types"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"no-self-compare":"off","guard-for-in":"off","max-depth":"off"},"ignores":["parse-entities.js"]},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"db8ace776923cf4b874e2e87f6b22aac6ad251d4","homepage":"https://github.com/wooorm/parse-entities#readme","_id":"@besync/parse-entities-webworker@2.0.0","_nodeVersion":"14.15.4","_npmVersion":"7.6.0","dist":{"integrity":"sha512-QfuQ9F38+b3Yf5FNAWMBAXXtE29b1yqCOChNmuJIZJyRfzy39sxa9zFAbK76Av4OWl2GSV3mv5q0uSofaKxi+w==","shasum":"51f99ec8d0fb39306baaac860e9de632d603d13f","tarball":"https://registry.npmjs.org/@besync/parse-entities-webworker/-/parse-entities-webworker-2.0.0.tgz","fileCount":7,"unpackedSize":25398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpSj/CRA9TVsSAnZWagAAr4QP/1J7CuAk8L464U7XCEeu\n6agz4z7i9RtDVIfOccgRCL8eO3pVpYenvJrLaFQ7wupnt2NDFGRJOpw6fBGl\nFHIQad87AhPywueDF4kw0YtftVoYzVZdTd8NFiBTrybB1G+BLOwYGo0LLVmw\nmNjDr+l6ymvpXR3UOaH+aY1Fa2Mb31z9RKp4GUb9M8NFewwmaE3h/0D4b0lZ\nJ2UvRpyD6lJNmwXPD669TR/UJgf72pxG8Uy6ksqs8s6X07btPKuXOe19pNbI\nyHyQizInuZXFI4HTZmPCU0jQR4omEgdmVV2rKm31BiTWatr2f6KPHIRULKex\nhVHfGJH/PYKOmwsXQjrK5ysd4/NFWX1BcA4Ma+WvCH0EMR5Qae+4DvI9dLfs\nOxvEjbXODBs6aQ2QWbVrCq6RZDwzU4w9anCTKLEFQp0XSyic3eu2he2rRawD\nCYcGyoVYiiYAUMtlsXR4Y+1KiFIu1fE6xWGu9zgl2htMmIhjIxaIgdgYDrtY\na0HVfGjCbkQDPUpoK9BsmQSfIlzhiF4EOCVTdUMVbK68aIR/mdnE5WPXZ77V\nfhtAPZmxCxnJe8iopKR0AsRvRO863lFv0oRiz3wAeCcnoCu8aJ6iekYjzmTu\n5mQUHfwJORmYCYUq2JB9DSshad14TjEdkjNfBd6m6Gc0KEkiIPF8Ib1ASydB\nDoQ+\r\n=Ncs1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDauL9q1b0HYCzys9yB2mr3w1AjDC7va+5pjJKlBX2uJAiBDCJcMVvH5ZRxhTL3upQ12ay5J3ZUdGyD5ncyV46l3Tg=="}]},"_npmUser":{"name":"guycreate","email":"guy@nodekit.io"},"directories":{},"maintainers":[{"name":"guycreate","email":"guy@nodekit.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-entities-webworker_2.0.0_1621436670738_0.31776755611216956"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-19T15:04:30.652Z","2.0.0":"2021-05-19T15:04:30.857Z","modified":"2022-04-04T18:33:58.379Z"},"maintainers":[{"email":"admin@tinia.org","name":"tinialabs1"},{"email":"guy-nodekit@barnardmail.net","name":"guycreate"}],"description":"Parse HTML character references: fast, spec-compliant, positional information","homepage":"https://github.com/wooorm/parse-entities#readme","keywords":["parse","html","character","reference","entity","entities"],"repository":{"type":"git","url":"git+https://github.com/wooorm/parse-entities.git"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/wooorm/parse-entities/issues"},"license":"MIT","readme":"# @besync/parse-entities\n\n## @besync fork of parse-entities\n\nChanged browser field in package.json so not automatically picked up by webpack for compatibility with webworker.  This \nfork is not needed if you can change your webpack config.\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nParse HTML character references: fast, spec-compliant, positional\ninformation.\n\n## Install\n\n[npm][]:\n\n```sh\nnpm install parse-entities\n```\n\n## Use\n\n```js\nvar decode = require('parse-entities')\n\ndecode('alpha &amp bravo')\n// => alpha & bravo\n\ndecode('charlie &copycat; delta')\n// => charlie ©cat; delta\n\ndecode('echo &copy; foxtrot &#8800; golf &#x1D306; hotel')\n// => echo © foxtrot ≠ golf 𝌆 hotel\n```\n\n## API\n\n## `parseEntities(value[, options])`\n\n##### `options`\n\n###### `options.additional`\n\nAdditional character to accept (`string?`, default: `''`).\nThis allows other characters, without error, when following an ampersand.\n\n###### `options.attribute`\n\nWhether to parse `value` as an attribute value (`boolean?`, default:\n`false`).\n\n###### `options.nonTerminated`\n\nWhether to allow non-terminated entities (`boolean`, default: `true`).\nFor example, `&copycat` for `©cat`.  This behaviour is spec-compliant but\ncan lead to unexpected results.\n\n###### `options.warning`\n\nError handler ([`Function?`][warning]).\n\n###### `options.text`\n\nText handler ([`Function?`][text]).\n\n###### `options.reference`\n\nReference handler ([`Function?`][reference]).\n\n###### `options.warningContext`\n\nContext used when invoking `warning` (`'*'`, optional).\n\n###### `options.textContext`\n\nContext used when invoking `text` (`'*'`, optional).\n\n###### `options.referenceContext`\n\nContext used when invoking `reference` (`'*'`, optional)\n\n###### `options.position`\n\nStarting `position` of `value` (`Location` or `Position`, optional).  Useful\nwhen dealing with values nested in some sort of syntax tree.  The default is:\n\n```js\n{\n  start: {line: 1, column: 1, offset: 0},\n  indent: []\n}\n```\n\n##### Returns\n\n`string` — Decoded `value`.\n\n### `function warning(reason, position, code)`\n\nError handler.\n\n##### Context\n\n`this` refers to `warningContext` when given to `parseEntities`.\n\n##### Parameters\n\n###### `reason`\n\nHuman-readable reason for triggering a parse error (`string`).\n\n###### `position`\n\nPlace at which the parse error occurred (`Position`).\n\n###### `code`\n\nIdentifier of reason for triggering a parse error (`number`).\n\nThe following codes are used:\n\n| Code | Example            | Note                                          |\n| ---- | ------------------ | --------------------------------------------- |\n| `1`  | `foo &amp bar`     | Missing semicolon (named)                     |\n| `2`  | `foo &#123 bar`    | Missing semicolon (numeric)                   |\n| `3`  | `Foo &bar baz`     | Ampersand did not start a reference           |\n| `4`  | `Foo &#`           | Empty reference                               |\n| `5`  | `Foo &bar; baz`    | Unknown entity                                |\n| `6`  | `Foo &#128; baz`   | [Disallowed reference][invalid]               |\n| `7`  | `Foo &#xD800; baz` | Prohibited: outside permissible unicode range |\n\n### `function text(value, location)`\n\nText handler.\n\n##### Context\n\n`this` refers to `textContext` when given to `parseEntities`.\n\n##### Parameters\n\n###### `value`\n\nString of content (`string`).\n\n###### `location`\n\nLocation at which `value` starts and ends (`Location`).\n\n### `function reference(value, location, source)`\n\nCharacter reference handler.\n\n##### Context\n\n`this` refers to `referenceContext` when given to `parseEntities`.\n\n##### Parameters\n\n###### `value`\n\nEncoded character reference (`string`).\n\n###### `location`\n\nLocation at which `value` starts and ends (`Location`).\n\n###### `source`\n\nSource of character reference (`Location`).\n\n## Related\n\n*   [`stringify-entities`](https://github.com/wooorm/stringify-entities)\n    — Encode HTML character references\n*   [`character-entities`](https://github.com/wooorm/character-entities)\n    — Info on character entities\n*   [`character-entities-html4`](https://github.com/wooorm/character-entities-html4)\n    — Info on HTML4 character entities\n*   [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy)\n    — Info on legacy character entities\n*   [`character-reference-invalid`](https://github.com/wooorm/character-reference-invalid)\n    — Info on invalid numeric character references\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://img.shields.io/travis/wooorm/parse-entities.svg\n\n[build]: https://travis-ci.org/wooorm/parse-entities\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/parse-entities.svg\n\n[coverage]: https://codecov.io/github/wooorm/parse-entities\n\n[downloads-badge]: https://img.shields.io/npm/dm/parse-entities.svg\n\n[downloads]: https://www.npmjs.com/package/parse-entities\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/parse-entities.svg\n\n[size]: https://bundlephobia.com/result?p=parse-entities\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[warning]: #function-warningreason-position-code\n\n[text]: #function-textvalue-location\n\n[reference]: #function-referencevalue-location-source\n\n[invalid]: https://github.com/wooorm/character-reference-invalid\n","readmeFilename":"readme.md"}