SILENT KILLERPanel

Current Path: > home > codekrsu > > shopceylon.store > wp-content > plugins > code-snippets > js > utils


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//shopceylon.store/wp-content/plugins/code-snippets/js/utils

NameTypeSizeLast ModifiedActions
Linter.ts File 4545 bytes February 14 2025 13:16:14.
errors.ts File 80 bytes November 27 2024 21:52:46.
files.ts File 1110 bytes November 27 2024 21:28:50.
general.ts File 249 bytes November 27 2024 21:28:50.
restAPI.ts File 793 bytes February 14 2025 13:16:14.
shortcodes.ts File 346 bytes May 19 2023 18:41:32.
snippets.ts File 968 bytes November 27 2024 21:28:50.
text.ts File 623 bytes February 14 2025 13:16:14.

Reading File: /home/codekrsu//shopceylon.store/wp-content/plugins/code-snippets/js/utils/text.ts

export const toCamelCase = (text: string): string =>
	text.replace(/-(?<letter>[a-z])/g, (_, letter: string) => letter.toUpperCase())

export const trimLeadingChar = (text: string, character: string): string =>
	character === text.charAt(0) ? text.slice(1) : text

export const trimTrailingChar = (text: string, character: string): string =>
	character === text.charAt(text.length - 1) ? text.slice(0, -1) : text

export const truncateWords = (text: string, wordCount: number): string => {
	const words = text.trim().split(/\s+/)

	return words.length > wordCount
		? `${words.slice(0, wordCount).join(' ')}…`
		: text
}

SILENT KILLER Tool