Jon1337228's picture
download
raw
504 Bytes
/*!
* 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, '')
}

Xet Storage Details

Size:
504 Bytes
·
Xet hash:
8ed932ed12ca8a13a3a7d3bf667c5f2b8651f6a31bd334d208198c553bdf1cec

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.