-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
According to the API, the charset parameter should be optional, when calling the extractCommentsFromFile function.
But, feeding an "us-ascii" / "utf-8" file to this function, without passing "{charset:'utf-8'}" as a parameter, returns an "ERR_UNKNOWN_ENCODING TypeError".
So:
commentList = commentExtractor.extractCommentsFromFile('/path/to/file.js',{charset:'utf-8'}); - works
but
commentList = commentExtractor.extractCommentsFromFile('/path/to/file.js'); throws:
UnhandledPromiseRejectionWarning: TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: null
at stringSlice (buffer.js:630:9)
at Buffer.toString (buffer.js:666:10)
[...]
Metadata
Metadata
Assignees
Labels
No labels