Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sonicdoe/ensure-slash
Ensure your string ends with a slash
https://github.com/sonicdoe/ensure-slash
0bsd es2015 javascript nodejs semver slash trailing-slash
Last synced: 13 days ago
JSON representation
Ensure your string ends with a slash
- Host: GitHub
- URL: https://github.com/sonicdoe/ensure-slash
- Owner: sonicdoe
- License: 0bsd
- Created: 2017-07-13T19:12:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-20T15:46:17.000Z (over 4 years ago)
- Last Synced: 2023-12-25T13:12:20.981Z (11 months ago)
- Topics: 0bsd, es2015, javascript, nodejs, semver, slash, trailing-slash
- Language: JavaScript
- Size: 226 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ensure-slash [![Build Status](https://img.shields.io/travis/sonicdoe/ensure-slash.svg)](https://travis-ci.org/sonicdoe/ensure-slash)
> Ensure your string ends with a slash
## Installation
```
$ npm install ensure-slash
```## Usage
```js
const ensureSlash = require('ensure-slash')ensureSlash('/home/foo')
// => '/home/foo/'ensureSlash('/home/bar/')
// => '/home/bar/'
```## Changelog
This project follows [Semantic Versioning 2](https://semver.org).
- v1.0.0 (2017-08-19): Fully commit to Semantic Versioning
- v0.1.0 (2017-07-13): Initial release