core3-utils

@wixc3/fs-utils on Github

Home > @wixc3/fs-utils > getFullExtname

getFullExtname() function

Returns file extension from the first occurrence of the “.”, unlike path.extname() which returns from the last occurrence.

Signature:

export declare function getFullExtname(filePath: string): string;

Parameters

Parameter Type Description
filePath string

Returns:

string

Example

  getFullExtname('/dir/my-component.st.css') // => '.st.css'