Download node_modules/toidentifier/index.js from khoadang31/uptimerobot: direct link, hf CLI and curl.
- Browser
- Download file 504 Bytes
-
https://huggingface.co/khoadang31/uptimerobot/resolve/main/node_modules/toidentifier/index.js
- Command line
-
hf download hf://khoadang31/uptimerobot/node_modules/toidentifier/index.js
-
curl -L -o index.js https://huggingface.co/khoadang31/uptimerobot/resolve/main/node_modules/toidentifier/index.js
504 Bytes
| /*! | |
| * toidentifier | |
| * Copyright(c) 2016 Douglas Christopher Wilson | |
| * MIT Licensed | |
| */ | |
| /** | |
| * Module exports. | |
| * @public | |
| */ | |
| module.exports = toIdentifier | |
| /** | |
| * Trasform the given string into a JavaScript identifier | |
| * | |
| * @param {string} str | |
| * @returns {string} | |
| * @public | |
| */ | |
| function toIdentifier (str) { | |
| return str | |
| .split(' ') | |
| .map(function (token) { | |
| return token.slice(0, 1).toUpperCase() + token.slice(1) | |
| }) | |
| .join('') | |
| .replace(/[^ _0-9a-z]/gi, '') | |
| } | |