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

20 lines (18 loc) 440 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = cleanChar; /** * clean the first occurrence of (`char`) from a string (`str`) * @name cleanChar * @param {string} str string to mainpulate. * @param {string} char char to clean. * @returns {string} cleaned string. * ```js * cleanChar('foo', 'f') // => 'oo' * ``` */ function cleanChar(str, char) { return str.replace(char, ''); }