forked from shmuelie/Humanizer.Js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcasingExtensions.js
More file actions
25 lines (25 loc) · 848 Bytes
/
casingExtensions.js
File metadata and controls
25 lines (25 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var Humanizer;
(function (Humanizer) {
"use strict";
/**
* Changes the casing of the provided input
*/
String.prototype.applyCasing = function (casing) {
/// <summary>
/// Changes the casing of the provided input
/// </summary>
switch (casing) {
case 0 /* Title */:
return this.transform(Humanizer.To.TitleCase);
case 2 /* LowerCase */:
return this.transform(Humanizer.To.LowerCase);
case 1 /* AllCaps */:
return this.transform(Humanizer.To.UpperCase);
case 3 /* Sentence */:
return this.transform(Humanizer.To.SentenceCase);
default:
throw new Error();
}
};
})(Humanizer || (Humanizer = {}));
//# sourceMappingURL=casingExtensions.js.map