Last active
January 8, 2023 15:49
-
-
Save ngs/3f1dfabcabe928d95d37d4705c776a86 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[].slice.call(document.querySelectorAll('#content > div.fixedFont'), 0).map(function(i, n){ | |
const text = i.innerText; | |
let desc = i.nextSibling; | |
while(desc && desc.className !== 'description') { | |
desc = desc.nextSibling; | |
} | |
const m = text.match(/\{([^\}]+)\}\s(.+)$/) || ['', 'void', text]; | |
const retType = m[1]; | |
const fn = m[2]; | |
return '/**\n * ' + desc.innerText.replace(/\n/g, '\n * ') + '\n */\n' + fn + ': ' + retType + ';'; | |
}).join('\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment