forked from jakesgordon/javascript-state-machine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamelize.js
More file actions
14 lines (13 loc) · 672 Bytes
/
camelize.js
File metadata and controls
14 lines (13 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import test from 'ava';
import camelize from '../../src/util/camelize';
test('camelize', t => {
t.is(camelize(""), "");
t.is(camelize("word"), "word");
t.is(camelize("Word"), "word");
t.is(camelize("WORD"), "word");
t.is(camelize("word-with-dash"), "wordWithDash");
t.is(camelize("word_with_underscore"), "wordWithUnderscore");
t.is(camelize("word--with--double--dash"), "wordWithDoubleDash");
t.is(camelize("word_WITH_mixed_CASE"), "wordWithMixedCase");
t.is(camelize("alreadyCamelizedString"), "alreadyCamelizedString");
});