UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

13 lines (12 loc) 491 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.upcase = upcase; function upcase(str) { // parity verified: Ruby 3.3 // discuss at: https://locutus.io/ruby/String/upcase/ // original by: Kevin van Zonneveld (https://kvz.io) // note 1: Returns a copy of str with all lowercase letters replaced with uppercase. // example 1: upcase('hELLo') // returns 1: 'HELLO' return (str + '').toUpperCase(); }