Skip to content

hasWindowsTrailingChars

Checks whether a name ends with the dots or spaces Windows refuses.

Answers for Windows regardless of the platform in use: a vault is synced, so the rules that matter are not necessarily those of the machine asking.

Import:

import { hasWindowsTrailingChars } from '@mnaoumov/obsidian-lib/validation';

Signature:

function hasWindowsTrailingChars(name: string): boolean

Parameters:

Parameter Type Description
name string The name to check. A single path segment, not a path.

Returns: boolean — true if the name ends with a dot or a space, false otherwise.