Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/davidquinn/psi-header
/ functions
Functions
70 in github.com/davidquinn/psi-header
⨍
Functions
70
◇
Types & classes
12
↓ 25 callers
Function
mapProperty
* Map the value of key from source to target. * Will not modify target if the property does not exist on source. * * @param {Object} source * @par
src/helper.ts:314
↓ 15 callers
Function
placeholder
* Generate a placeholder string. * * @param {string} str * @returns {string}
src/helper.ts:1106
↓ 10 callers
Function
mapLangConfig
* Maps the values for language config properties from source to target. * Will not modify target for any property not found in source. * * @param {
src/helper.ts:277
↓ 8 callers
Function
trimStart
(s: string)
src/helper.ts:1288
↓ 7 callers
Function
replacePlaceholders
(source: string, variables: IVariableList, prevLine: string | null = null, zeroDate: ZeroDate = 'asIs')
src/helper.ts:764
↓ 6 callers
Function
overrideSeparator
(path: string, separator?: string)
src/helper.ts:1293
↓ 5 callers
Function
getProjectRootPath
* Pass in a fully qualified file path and return the part of the path where an associated package.json file is located. * Iterates up through the dir
src/helper.ts:402
↓ 4 callers
Function
addLineSuffix
(line: string, suffix: string, wrapCol: number, tabSize: number)
src/helper.ts:792
↓ 4 callers
Function
escapeRegExp
* Escapes regular expression special characters * * @param value the string to escape
src/helper.ts:1142
↓ 4 callers
Function
getLanguageConfig
(wsConfig: WorkspaceConfiguration, langId: string, filename: string)
src/helper.ts:218
↓ 4 callers
Function
getMappableRecord
* Find the correct template or language config record. * * Returns the config record where the language matches either the `fileXtn` or * `langId`
src/helper.ts:133
↓ 4 callers
Function
isCompactMode
(langConfig: ILangConfig)
src/helper.ts:737
↓ 3 callers
Method
_startsWith
(line: string, langPrefix: string, searchText: string)
src/changesTrackingController.ts:445
↓ 3 callers
Function
constructFunctionReferences
* Construct a placeholder variable list for a specified function based on the template text content. * @param {IVariableList} references an existing
src/helper.ts:994
↓ 3 callers
Function
getActiveFileCreationDate
* Return the current editor file's creation date (birthtime) *
src/helper.ts:564
↓ 3 callers
Function
getConfig
(wsConfig: WorkspaceConfiguration, langConfig: ILangConfig)
src/helper.ts:72
↓ 3 callers
Function
getRelativeFilePath
(fullpath: string, rootDirFileName?: string, addLeadingDot: boolean = false)
src/helper.ts:530
↓ 2 callers
Method
_docNeedsHeader
* Returns true if the file appears to need a header. * * @private * @param {TextDocument} doc * @returns * @memberof ChangesTrackingControll
src/changesTrackingController.ts:402
↓ 2 callers
Method
_filenameInGlobs
(filename: string, globs: string[])
src/changesTrackingController.ts:361
↓ 2 callers
Method
_getConfig
* Reads the configuration and caches it in this object. * * @private * @memberof ChangesTrackingController
src/changesTrackingController.ts:291
↓ 2 callers
Method
_want
* Returns true if change tracking is active for the specified language, * or if the filename matches an active glob pattern. * * @private * @p
src/changesTrackingController.ts:346
↓ 2 callers
Function
arrayToString
* Turns a string array into an EOL delimited string. * * @param {Array<string>} source * @returns {string}
src/helper.ts:752
↓ 2 callers
Function
extractFileName
* Get the filename from the file full path * * @param {string} fullpath * @returns {string}
src/helper.ts:509
↓ 2 callers
Function
getAuthorName
(ignoreAuthorFullName: boolean)
src/helper.ts:487
↓ 2 callers
Function
getFileCreationDate
(filename: string, zeroDate: ZeroDate = 'asIs')
src/helper.ts:578
↓ 2 callers
Function
getIndicesOf
* Search the haystack for instances of needle and return an array of index positions. * * @param needle the value to search for * @param haystack t
src/helper.ts:1117
↓ 2 callers
Function
getMergedVariables
(wsConfig: WorkspaceConfiguration)
src/helper.ts:1260
↓ 2 callers
Function
getProjectName
* Get the name of the project - either from a package.json or the last part of the root project path. * * @param {string} filename The file to dete
src/helper.ts:438
↓ 2 callers
Function
getTemplateConfig
(wsConfig: WorkspaceConfiguration, langId: string, filename: string)
src/helper.ts:165
↓ 2 callers
Function
getVariables
(wsConfig: WorkspaceConfiguration, document: TextDocument, config: IConfig, langConfig: ILangConfig, ignoreLic
src/helper.ts:331
↓ 2 callers
Function
insertFileHeader
()
src/insertFileHeaderCommand.ts:42
↓ 2 callers
Function
y2y
* Returns a year to year string from the passed in from and to year parameters * * @param fromArg First yeartoyear() argument text * @param toArg
src/helper.ts:941
↓ 2 callers
Function
y2yYear
* Process a year argument, which might be the special string "fc" or "now". * * @param arg The argument year, or special value "fc" or "now" * @p
src/helper.ts:921
↓ 1 callers
Method
_fileIsNew
* Returns true if the file is new (created within the past 3 seconds). * * @private * @param {any} filename * @returns * @memberof ChangesTr
src/changesTrackingController.ts:378
↓ 1 callers
Method
_isIgnorableLine
(line: string, ignorants: Array<string>)
src/changesTrackingController.ts:429
↓ 1 callers
Function
_modifyForDayZero
* If the passed in date is Unix Epoch Zero then return the value defined by * ifZero, otherwise just return the date. * * @param {Date} date * @pa
src/helper.ts:601
↓ 1 callers
Method
_wantAutoHeader
* Returns true if auto header creation is active. * * @private * @returns * @memberof ChangesTrackingController
src/changesTrackingController.ts:390
↓ 1 callers
Function
addLicenseVariables
* Add the license and related variables from the SPDX data. * * @param {WorkspaceConfiguration} wsConfig * @param {IVariableList} variables * @par
src/helper.ts:621
↓ 1 callers
Function
baseLangConfig
* Generate the base language configuration object. * * @param {string} langId The language id of the target file * @param {ILangConfig | undefined}
src/helper.ts:234
↓ 1 callers
Function
captionRowIndex
* Determines the location (line index) for the next change log. * @param doc * @param template * @param langConfig * @param naturalOrder * @p
src/insertChangeLogCommand.ts:87
↓ 1 callers
Function
cleanSpdxLicenseText
* Clean up some of the easier goo goo muck from the license text. * * @param {string} lic * @returns {string}
src/helper.ts:1064
↓ 1 callers
Function
constructFunctionReferencesWithPrev
* Construct a placeholder variable list for a specified function based on the template text content and the existing content. * * The second argume
src/helper.ts:1021
↓ 1 callers
Function
getEditorWordWrapColumn
(def: number = 80)
src/helper.ts:741
↓ 1 callers
Function
getFullPathWithoutFilename
(fullpath: string)
src/helper.ts:555
↓ 1 callers
Function
getMergedLangConfig
(wsConfig: WorkspaceConfiguration)
src/helper.ts:1224
↓ 1 callers
Function
getMergedTemplates
(wsConfig: WorkspaceConfiguration)
src/helper.ts:1188
↓ 1 callers
Function
getPaddingValues
(fromLine: string)
src/helper.ts:843
↓ 1 callers
Function
getProjectVersion
* Get the name of the project - either from a package.json or the last part of the root project path. * * @param {string} filename The file to dete
src/helper.ts:463
↓ 1 callers
Function
getRelativePathWithoutFilename
(fullpath: string, rootDirFileName?: string)
src/helper.ts:546
↓ 1 callers
Function
insertChangeLog
()
src/insertChangeLogCommand.ts:38
↓ 1 callers
Function
mapTemplateConfig
* Maps the values for template configuration properties from source to target. * Will not modify target for any property not found in source. * * @
src/helper.ts:186
↓ 1 callers
Function
merge
(template: Array<string>, langConfig: ILangConfig, variables: IVariableList, config: IConfig, editor: TextEdit
src/helper.ts:700
↓ 1 callers
Function
mergeLangConfigLists
* General method to merge one or more [[ILangConfigList]] arrays into a single * array that includes all of the language configuration lists from all
src/helper.ts:1236
↓ 1 callers
Function
mergeStringLists
* General method to merge one or more string arrays into a single array that * includes all of the strings from all of the passed in string arrays.
src/helper.ts:1169
↓ 1 callers
Function
mergeTemplateLists
* General method to merge one or more [[ITemplateList]] arrays into a single * array that includes all of the template lists from all of the passed i
src/helper.ts:1199
↓ 1 callers
Function
mergeVariableLists
* General method to merge one or more [[IVariableList]] arrays into a single * array that includes all of the variable lists from all of the passed i
src/helper.ts:1271
↓ 1 callers
Function
removeFunctionCall
(functionName: string, fromLine: string)
src/helper.ts:833
↓ 1 callers
Function
replaceFunctions
* Process template function placeholders * * @param source the template text * @param prevLine the replaced line, or null if not replacing * @para
src/helper.ts:872
↓ 1 callers
Function
replaceTemplateVariables
(template: Array<string>, linePrefix: string, variables: IVariableList, zeroDate: ZeroDate)
src/helper.ts:683
↓ 1 callers
Function
retrieveAuthorFullName
()
src/helper.ts:495
↓ 1 callers
Function
safeParseInt
(s: string, fallback: number)
src/helper.ts:859
↓ 1 callers
Function
wordWrap
* Wrap the word wrap wrapper in a wrapper that wraps words. (No rap!) * * @param {string} str * @param {number} width * @returns {Array<string>}
src/helper.ts:1094
Method
_onConfigChanged
* Re-reads the configuration settings. * * @private * @memberof ChangesTrackingController
src/changesTrackingController.ts:253
Method
_onDidChangeActiveTextEditor
* Called whenever the active editor is changed. * This controls automatic adding of headers to new files. * * @private * @param {TextEditor} e
src/changesTrackingController.ts:265
Method
_onWillSave
* Delegate method triggered whenever a document will be saved. * Used to update an existing header or force a header if enforceHeader is true. *
src/changesTrackingController.ts:116
Function
activate
(context: ExtensionContext)
src/extension.ts:42
Method
constructor
* Creates an instance of ChangesTrackingController. * @memberof ChangesTrackingController
src/changesTrackingController.ts:90
Function
deactivate
()
src/extension.ts:61
Method
dispose
* Dispose of the ChangesTrackingController. * * @memberof ChangesTrackingController
src/changesTrackingController.ts:104
Function
getMergedStrings
(wsConfig: WorkspaceConfiguration, key: string)
src/helper.ts:1157