{
  "name": "classes.js",
  "path": "src/attributes/classes.js",
  "sha": "796fbcc808ca15bbe771f8c9c1a7bab3388f6128",
  "size": 3553,
  "url": "https://api.github.com/repos/jquery/jquery/contents/src/attributes/classes.js?ref=a684e6ba836f7c553968d7d026ed7941e1a612d8",
  "html_url": "https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/attributes/classes.js",
  "git_url": "https://api.github.com/repos/jquery/jquery/git/blobs/796fbcc808ca15bbe771f8c9c1a7bab3388f6128",
  "download_url": "https://raw.githubusercontent.com/jquery/jquery/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/attributes/classes.js",
  "type": "file",
  "content": "aW1wb3J0IGpRdWVyeSBmcm9tICIuLi9jb3JlLmpzIjsKaW1wb3J0IHN0cmlw\nQW5kQ29sbGFwc2UgZnJvbSAiLi4vY29yZS9zdHJpcEFuZENvbGxhcHNlLmpz\nIjsKaW1wb3J0IHJub3RodG1sd2hpdGUgZnJvbSAiLi4vdmFyL3Jub3RodG1s\nd2hpdGUuanMiOwoKaW1wb3J0ICIuLi9jb3JlL2luaXQuanMiOwoKZnVuY3Rp\nb24gZ2V0Q2xhc3MoIGVsZW0gKSB7CglyZXR1cm4gZWxlbS5nZXRBdHRyaWJ1\ndGUgJiYgZWxlbS5nZXRBdHRyaWJ1dGUoICJjbGFzcyIgKSB8fCAiIjsKfQoK\nZnVuY3Rpb24gY2xhc3Nlc1RvQXJyYXkoIHZhbHVlICkgewoJaWYgKCBBcnJh\neS5pc0FycmF5KCB2YWx1ZSApICkgewoJCXJldHVybiB2YWx1ZTsKCX0KCWlm\nICggdHlwZW9mIHZhbHVlID09PSAic3RyaW5nIiApIHsKCQlyZXR1cm4gdmFs\ndWUubWF0Y2goIHJub3RodG1sd2hpdGUgKSB8fCBbXTsKCX0KCXJldHVybiBb\nXTsKfQoKalF1ZXJ5LmZuLmV4dGVuZCggewoJYWRkQ2xhc3M6IGZ1bmN0aW9u\nKCB2YWx1ZSApIHs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src/attributes/classes.js?ref=a684e6ba836f7c553968d7d026ed7941e1a612d8",
    "git": "https://api.github.com/repos/jquery/jquery/git/blobs/796fbcc808ca15bbe771f8c9c1a7bab3388f6128",
    "html": "https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/attributes/classes.js"
  }
}