'use strict';

export default function stripNamedFunction(input) {
    return input.replace(/([\=|\[|\,|\(|\:|\!])[\s]*function\s+([\w]+)(\([\w|\,|\s]*?\2[\w|\,|\s]*?\))/g, '$1function$3');
};
@@ -54,17 +54,216 @@
 tion
-(input) %7B
+Expression(input) %7B%0A%0A    if ('undefined' == typeof input) %7B%0A        throw %60input must be a string%60;%0A        return %60%60;%0A    %7D else if (%60%60 === input) %7B%0A        throw %60input was empty%60;%0A        return %60%60;%0A    %7D%0A
 %0A   
@@ -309,14 +309,14 @@
 %7C%5C!%5D
-)
 %5B%5Cs%5D*
+)
 func

Add if-conditions for exception