feat(ui): finalize E-TIB modernization with footer redesign, video optimization, and TS fixes
Former-commit-id: 67ac02c8404cc66893fdf97308574701cca6000c
This commit is contained in:
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* @typedef {import('./lib/index.js').Options} Options
|
||||
*/
|
||||
|
||||
export {cont, name, start} from './lib/index.js'
|
||||
Generated
Vendored
+61
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* @typedef Options
|
||||
* Configuration.
|
||||
* @property {boolean | null | undefined} [jsx=false]
|
||||
* Support JSX identifiers (default: `false`).
|
||||
*/
|
||||
|
||||
const startRe = /[$_\p{ID_Start}]/u
|
||||
const contRe = /[$_\u{200C}\u{200D}\p{ID_Continue}]/u
|
||||
const contReJsx = /[-$_\u{200C}\u{200D}\p{ID_Continue}]/u
|
||||
const nameRe = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u
|
||||
const nameReJsx = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u
|
||||
|
||||
/** @type {Options} */
|
||||
const emptyOptions = {}
|
||||
|
||||
/**
|
||||
* Checks if the given code point can start an identifier.
|
||||
*
|
||||
* @param {number | undefined} code
|
||||
* Code point to check.
|
||||
* @returns {boolean}
|
||||
* Whether `code` can start an identifier.
|
||||
*/
|
||||
// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.
|
||||
export function start(code) {
|
||||
return code ? startRe.test(String.fromCodePoint(code)) : false
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given code point can continue an identifier.
|
||||
*
|
||||
* @param {number | undefined} code
|
||||
* Code point to check.
|
||||
* @param {Options | null | undefined} [options]
|
||||
* Configuration (optional).
|
||||
* @returns {boolean}
|
||||
* Whether `code` can continue an identifier.
|
||||
*/
|
||||
// Note: `undefined` is supported so you can pass the result from `''.codePointAt`.
|
||||
export function cont(code, options) {
|
||||
const settings = options || emptyOptions
|
||||
const re = settings.jsx ? contReJsx : contRe
|
||||
return code ? re.test(String.fromCodePoint(code)) : false
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given value is a valid identifier name.
|
||||
*
|
||||
* @param {string} name
|
||||
* Identifier to check.
|
||||
* @param {Options | null | undefined} [options]
|
||||
* Configuration (optional).
|
||||
* @returns {boolean}
|
||||
* Whether `name` can be an identifier.
|
||||
*/
|
||||
export function name(name, options) {
|
||||
const settings = options || emptyOptions
|
||||
const re = settings.jsx ? nameReJsx : nameRe
|
||||
return re.test(name)
|
||||
}
|
||||
Generated
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"name": "estree-util-is-identifier-name",
|
||||
"version": "3.0.0",
|
||||
"description": "Check if something can be an ecmascript (javascript) identifier name",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"estree",
|
||||
"ast",
|
||||
"ecmascript",
|
||||
"javascript",
|
||||
"tree",
|
||||
"identifier",
|
||||
"character"
|
||||
],
|
||||
"repository": "syntax-tree/estree-util-is-identifier-name",
|
||||
"bugs": "https://github.com/syntax-tree/estree-util-is-identifier-name/issues",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
},
|
||||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
|
||||
"contributors": [
|
||||
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"files": [
|
||||
"lib/",
|
||||
"index.d.ts",
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.0.0",
|
||||
"c8": "^8.0.0",
|
||||
"prettier": "^3.0.0",
|
||||
"remark-cli": "^11.0.0",
|
||||
"remark-preset-wooorm": "^9.0.0",
|
||||
"type-coverage": "^2.0.0",
|
||||
"typescript": "^5.0.0",
|
||||
"xo": "^0.55.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "npm run build && npm run format",
|
||||
"build": "tsc --build --clean && tsc --build && type-coverage",
|
||||
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
|
||||
"test-api": "node --conditions development test.js",
|
||||
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run format && npm run test-coverage"
|
||||
},
|
||||
"prettier": {
|
||||
"bracketSpacing": false,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "none",
|
||||
"useTabs": false
|
||||
},
|
||||
"remarkConfig": {
|
||||
"plugins": [
|
||||
"remark-preset-wooorm"
|
||||
]
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
"ignoreCatch": true,
|
||||
"strict": true
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user