lang.ts — vue Source File
Architecture documentation for lang.ts, a typescript file in the vue codebase. 0 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR c4a53b79_1d91_2cda_05b8_fb4aee17fc5c["lang.ts"] 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777["options.ts"] 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777 --> c4a53b79_1d91_2cda_05b8_fb4aee17fc5c style c4a53b79_1d91_2cda_05b8_fb4aee17fc5c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* unicode letters used for parsing html tags, component names and property paths.
* using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
* skipping \u10000-\uEFFFF due to it freezing up PhantomJS
*/
export const unicodeRegExp =
/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/
/**
* Check if a string starts with $ or _
*/
export function isReserved(str: string): boolean {
const c = (str + '').charCodeAt(0)
return c === 0x24 || c === 0x5f
}
/**
* Define a property.
*/
export function def(obj: Object, key: string, val: any, enumerable?: boolean) {
Object.defineProperty(obj, key, {
value: val,
enumerable: !!enumerable,
writable: true,
configurable: true
})
}
/**
* Parse simple path.
*/
const bailRE = new RegExp(`[^${unicodeRegExp.source}.$_\\d]`)
export function parsePath(path: string): any {
if (bailRE.test(path)) {
return
}
const segments = path.split('.')
return function (obj) {
for (let i = 0; i < segments.length; i++) {
if (!obj) return
obj = obj[segments[i]]
}
return obj
}
}
Domain
Subdomains
Functions
Imported By
Source
Frequently Asked Questions
What does lang.ts do?
lang.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, GlobalAPI subdomain.
What functions are defined in lang.ts?
lang.ts defines 3 function(s): def, isReserved, parsePath.
What files import lang.ts?
lang.ts is imported by 1 file(s): options.ts.
Where is lang.ts in the architecture?
lang.ts is located at src/core/util/lang.ts (domain: VueCore, subdomain: GlobalAPI, directory: src/core/util).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free