UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

18 lines (14 loc) 289 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = stripTrailingChar; function stripTrailingChar(str, char) { if (!str || !char) { return str; } if (str[str.length - 1] === char) { return str.slice(0, -1); } return str; }