Welcome to mirror list, hosted at ThFree Co, Russian Federation.

camel-case.js « postcss-jsx « node_modules « assets - github.com/fourtyone11/origin-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f182de4c4543ea7366369eba02ccb61c51910f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"use strict";
function camelCase (str) {
	return str.replace(/[\w-]+/g, (s) => (
		/^-?[a-z]+(?:-[a-z]+)+$/.test(s)
			? s.replace(
				/^-(ms|moz|khtml|epub|(\w+-?)*webkit)(?=-)/i,
				"$1"
			).replace(
				/-\w/g,
				s => (
					s[1].toUpperCase()
				)
			)
			: s
	));
}

module.exports = camelCase;