Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

jztechpe/str-bounds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

str-bounds

Utility library to add or remove a character from the start or end of a string.

Useful to build urls, queries, etc.

How to install?

npm install @juntoz/str-bounds

How to use?

const bounds = require('@juntoz/str-bounds');

var urlpath = 'mypath';
bounds.ensureInitSlash(urlpath);
// => /mypath

var urlhost = 'http://github.com';
bounds.ensureFinalSlash(urlhost);
// => http://github.com/

About

Utility library to add or remove a character from the start or end of a string. Useful to build urls, queries, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published