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
14 lines (12 loc) • 384 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = generateRandomStr;
/**
* Generates random string of specific size
* @param size
*/
function generateRandomStr(size = 8) {
return Math.random().toString(36).slice(size * -1).replace('.', ''); // it's rare but possible that the first char is '.', which is invalid for a scope-name
}
;