Gathering detailed insights and metrics for @besync/parse-entities-webworker
Gathering detailed insights and metrics for @besync/parse-entities-webworker
npm install @besync/parse-entities-webworker
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
405
Last Day
1
Last Week
1
Last Month
5
Last Year
55
49 Stars
116 Commits
12 Forks
5 Watching
1 Branches
7 Contributors
Minified
Minified + Gzipped
Latest Version
2.0.0
Package Id
@besync/parse-entities-webworker@2.0.0
Unpacked Size
24.80 kB
Size
7.69 kB
File Count
7
NPM Version
7.6.0
Node Version
14.15.4
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
25%
5
Compared to previous month
Last year
-46.6%
55
Compared to previous year
Changed browser field in package.json so not automatically picked up by webpack for compatibility with webworker. This fork is not needed if you can change your webpack config.
Parse HTML character references: fast, spec-compliant, positional information.
npm:
1npm install parse-entities
1var decode = require('parse-entities') 2 3decode('alpha & bravo') 4// => alpha & bravo 5 6decode('charlie ©cat; delta') 7// => charlie Β©cat; delta 8 9decode('echo © foxtrot ≠ golf 𝌆 hotel') 10// => echo Β© foxtrot β golf π hotel
parseEntities(value[, options])
options
options.additional
Additional character to accept (string?
, default: ''
).
This allows other characters, without error, when following an ampersand.
options.attribute
Whether to parse value
as an attribute value (boolean?
, default:
false
).
options.nonTerminated
Whether to allow non-terminated entities (boolean
, default: true
).
For example, ©cat
for Β©cat
. This behaviour is spec-compliant but
can lead to unexpected results.
options.warning
Error handler (Function?
).
options.text
Text handler (Function?
).
options.reference
Reference handler (Function?
).
options.warningContext
Context used when invoking warning
('*'
, optional).
options.textContext
Context used when invoking text
('*'
, optional).
options.referenceContext
Context used when invoking reference
('*'
, optional)
options.position
Starting position
of value
(Location
or Position
, optional). Useful
when dealing with values nested in some sort of syntax tree. The default is:
1{ 2 start: {line: 1, column: 1, offset: 0}, 3 indent: [] 4}
string
β Decoded value
.
function warning(reason, position, code)
Error handler.
this
refers to warningContext
when given to parseEntities
.
reason
Human-readable reason for triggering a parse error (string
).
position
Place at which the parse error occurred (Position
).
code
Identifier of reason for triggering a parse error (number
).
The following codes are used:
Code | Example | Note |
---|---|---|
1 | foo & bar | Missing semicolon (named) |
2 | foo { bar | Missing semicolon (numeric) |
3 | Foo &bar baz | Ampersand did not start a reference |
4 | Foo &# | Empty reference |
5 | Foo &bar; baz | Unknown entity |
6 | Foo € baz | Disallowed reference |
7 | Foo � baz | Prohibited: outside permissible unicode range |
function text(value, location)
Text handler.
this
refers to textContext
when given to parseEntities
.
value
String of content (string
).
location
Location at which value
starts and ends (Location
).
function reference(value, location, source)
Character reference handler.
this
refers to referenceContext
when given to parseEntities
.
value
Encoded character reference (string
).
location
Location at which value
starts and ends (Location
).
source
Source of character reference (Location
).
stringify-entities
β Encode HTML character referencescharacter-entities
β Info on character entitiescharacter-entities-html4
β Info on HTML4 character entitiescharacter-entities-legacy
β Info on legacy character entitiescharacter-reference-invalid
β Info on invalid numeric character referencesMIT Β© Titus Wormer
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
9 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 8
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-20
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More