Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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