If it's still relevant, I've just created an NPM package called asf-file-props doing precisely that (extract and calculate duration) in TypeScript with no dependencies. Works with .asf, .wma and .wmv files.
Check out the sources on Github, those are pretty concise and straightforward: https://github.com/chamie/asf-file-props