✏️ 编辑:index.js
路径:
/home/boguraj1/public_html/jobsite/node_modules/toidentifier/index.js
大小:504 B · 修改:2022-11-21 20:12:24 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
/*! * toidentifier * Copyright(c) 2016 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * 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, '') }
💾 保存
取消
保存为 UTF-8,换行统一为 LF