Skip to content

Latest commit

 

History

History

ekst

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

ekst npm

Append, prepend, replace or remove basename extensions.

Install

$ yarn add ekst

Usage

import { appendExt, prependExt, replaceExt, removeExt } from 'ekst'

appendExt('file.a.b', '.c') // file.a.b.c
prependExt('file.b.c', '.a') // file.a.b.c
replaceExt('file.a.d.d.c', '.d', '.b') // file.a.b.b.c
removeExt('file.a.d.b.d.c.d.d', '.d') // file.a.b.c