Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. export default class Utils {
  2. constructor() {
  3. let e = new Error('is a static class, no need to instantiate!');
  4. e.name = 'Utils';
  5.  
  6. throw e.toString();
  7. }
  8.  
  9. static toCamelCase(str) {
  10. return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function(letter, index) {
  11. return index == 0 ? letter.toLowerCase() : letter.toUpperCase();
  12. }).replace(/(\s|-|_)+/g, '');
  13. }
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement