Make camel,etc smart and add tests

This commit is contained in:
toby 2017-05-02 11:21:04 -04:00
parent d5def01a9d
commit 116c0680a2
6 changed files with 234 additions and 47 deletions

View file

@ -181,9 +181,6 @@ const Categories = [
"Parse UNIX file permissions",
"Swap endianness",
"Parse colour code",
"To Snake case",
"To Camel case",
"To Kebab case",
]
},
{
@ -274,6 +271,9 @@ const Categories = [
"CSS selector",
"Strip HTML tags",
"Diff",
"To Snake case",
"To Camel case",
"To Kebab case",
]
},
{

View file

@ -3257,10 +3257,15 @@ const OperationConfig = {
"<br><br>",
"e.g. this_is_snake_case",
].join("\n"),
run: StrUtils.runToSnakeCase,
run: Code.runToSnakeCase,
inputType: "string",
outputType: "string",
args: [
{
name: "Attempt to be context aware",
type: "boolean",
value: false,
},
]
},
"To Camel case": {
@ -3271,10 +3276,15 @@ const OperationConfig = {
"<br><br>",
"e.g. thisIsCamelCase",
].join("\n"),
run: StrUtils.runToCamelCase,
run: Code.runToCamelCase,
inputType: "string",
outputType: "string",
args: [
{
name: "Attempt to be context aware",
type: "boolean",
value: false,
},
]
},
"To Kebab case": {
@ -3285,10 +3295,15 @@ const OperationConfig = {
"<br><br>",
"e.g. this-is-kebab-case",
].join("\n"),
run: StrUtils.runToKebabCase,
run: Code.runToKebabCase,
inputType: "string",
outputType: "string",
args: [
{
name: "Attempt to be context aware",
type: "boolean",
value: false,
},
]
},
};