Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
/ ekst Public archive

🔡 Append, prepend, replace or remove basename extensions

License

Notifications You must be signed in to change notification settings

deepsweet/ekst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ekst

⚠️ Project has been transferred to NexTools metarepo

npm tests coverage

Append, prepend, replace or remove basename extensions.

Requirements

  • Node.js >= 8.6.0

Install

$ yarn add ekst
# or
$ npm install 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