tools: modernize tools/license2rtf.js
This PR tries to modernize some tooling code. Should still produce the same result:
$ git checkout master
Switched to branch 'master'
$ Release/node tools/license2rtf.js > LICENSE_ORIGINAL.rtf
$ cat LICENSE | Release/node tools/license2rtf.js > LICENSE_ORIGINAL.rtf
$ git checkout tools-license-es6
Switched to branch 'tools-license-es6'
$ cat LICENSE | Release/node tools/license2rtf.js > LICENSE_NEW.rtf
$ sha256sum LICENSE_ORIGINAL.rtf LICENSE_NEW.rtf
4331ecea25a7cfc6948d7fdd8b3e298f54de913591e6a3962b8302b80179acbb *LICENSE_ORIGINAL.rtf
4331ecea25a7cfc6948d7fdd8b3e298f54de913591e6a3962b8302b80179acbb *LICENSE_NEW.rtf
Changes:
- ES classes instead of
util.inherits
- ES string functions (
trimRight
,padStart
) - Template strings
There are still some possible improvements but it's a start.
Checklist
-
commit message follows commit guidelines
Affected core subsystem(s)
tools