Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.
This commit is contained in:
19
node_modules/decode-named-character-reference/index.js
generated
vendored
Normal file
19
node_modules/decode-named-character-reference/index.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import {characterEntities} from 'character-entities'
|
||||
|
||||
// To do: next major: use `Object.hasOwn`.
|
||||
const own = {}.hasOwnProperty
|
||||
|
||||
/**
|
||||
* Decode a single character reference (without the `&` or `;`).
|
||||
* You probably only need this when you’re building parsers yourself that follow
|
||||
* different rules compared to HTML.
|
||||
* This is optimized to be tiny in browsers.
|
||||
*
|
||||
* @param {string} value
|
||||
* `notin` (named), `#123` (deci), `#x123` (hexa).
|
||||
* @returns {string|false}
|
||||
* Decoded reference.
|
||||
*/
|
||||
export function decodeNamedCharacterReference(value) {
|
||||
return own.call(characterEntities, value) ? characterEntities[value] : false
|
||||
}
|
Reference in New Issue
Block a user