mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 13:14:44 +00:00
.
This commit is contained in:
parent
fc725ba36b
commit
422b9fdb15
7395 changed files with 1786235 additions and 3476 deletions
33
node_modules/lodash/_createCaseFirst.js
generated
vendored
Normal file
33
node_modules/lodash/_createCaseFirst.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
var castSlice = require('./_castSlice'),
|
||||
hasUnicode = require('./_hasUnicode'),
|
||||
stringToArray = require('./_stringToArray'),
|
||||
toString = require('./toString');
|
||||
|
||||
/**
|
||||
* Creates a function like `_.lowerFirst`.
|
||||
*
|
||||
* @private
|
||||
* @param {string} methodName The name of the `String` case method to use.
|
||||
* @returns {Function} Returns the new case function.
|
||||
*/
|
||||
function createCaseFirst(methodName) {
|
||||
return function(string) {
|
||||
string = toString(string);
|
||||
|
||||
var strSymbols = hasUnicode(string)
|
||||
? stringToArray(string)
|
||||
: undefined;
|
||||
|
||||
var chr = strSymbols
|
||||
? strSymbols[0]
|
||||
: string.charAt(0);
|
||||
|
||||
var trailing = strSymbols
|
||||
? castSlice(strSymbols, 1).join('')
|
||||
: string.slice(1);
|
||||
|
||||
return chr[methodName]() + trailing;
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = createCaseFirst;
|
Loading…
Add table
Add a link
Reference in a new issue