ensure-slash

Ensure your string ends with a slash


Keywords
ensure, slash, string, trailing, 0bsd, es2015, javascript, nodejs, semver, trailing-slash
License
0BSD
Install
npm install ensure-slash@1.0.0

Documentation

ensure-slash Build Status

Ensure your string ends with a slash

Installation

$ npm install ensure-slash

Usage

const ensureSlash = require('ensure-slash')

ensureSlash('/home/foo')
// => '/home/foo/'

ensureSlash('/home/bar/')
// => '/home/bar/'

Changelog

This project follows Semantic Versioning 2.

  • v1.0.0 (2017-08-19): Fully commit to Semantic Versioning
  • v0.1.0 (2017-07-13): Initial release