Skip to content

Instantly share code, notes, and snippets.

@ku
Last active July 28, 2016 03:27
Show Gist options
  • Save ku/de02f99aa82633a91f1aca8cfa3e6664 to your computer and use it in GitHub Desktop.
Save ku/de02f99aa82633a91f1aca8cfa3e6664 to your computer and use it in GitHub Desktop.
Object.keys(Case).map(function (k) {
if (Case[k] instanceof Function) {return k}
}).filter(function (x) {return x} ).reduce(function (h, k) {
h[k] = Case[k]("attrClass"); return h
}, {})
{
"of": "camel",
"flip": "ATTRcLASS",
"random": "aTTrClaSs",
"lower": "attr class",
"snake": "attr_class",
"constant": "ATTR_CLASS",
"camel": "attrClass",
"kebab": "attr-class",
"upper": "ATTR CLASS",
"capital": "Attr Class",
"pascal": "AttrClass",
"title": "Attr Class",
"sentence": "Attr class",
"squish": "AttrClass"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment