locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
14 lines (13 loc) • 448 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.lc = lc;
function lc(str) {
// discuss at: https://locutus.io/perl/lc/
// parity verified: Perl 5.40
// original by: Kevin van Zonneveld (https://kvz.io)
// example 1: lc('HELLO')
// returns 1: 'hello'
// example 2: lc('Hello World')
// returns 2: 'hello world'
return String(str).toLowerCase();
}