node-sanitize-filename
node-sanitize-filename copied to clipboard
Add an option to specify an extension
Example:
sanitize('long-filename.tar.gz', { extension: '.tar.gz' })
This should truncate the filename while preserving the extension.
@mohd-akram Hi, should this issue be closed actually by #63 ? Just found the project recently, seems very useful and compact! I'm using it for sanitizing HTTP "GET" request paths (the resource string). Let me know if there is something, testing or similar, than can be done with this issue. What does truncation mean in the case of filename?