locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
14 lines (13 loc) • 482 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.upcase = upcase;
function upcase(string) {
// discuss at: https://locutus.io/elixir/upcase/
// parity verified: Elixir 1.18
// original by: Kevin van Zonneveld (https://kvz.io)
// example 1: upcase('hello')
// returns 1: 'HELLO'
// example 2: upcase('Hello World')
// returns 2: 'HELLO WORLD'
return String(string).toUpperCase();
}