Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

File extension with multiple dots #66

Closed
wants to merge 1 commit into from
Closed

Conversation

levonet
Copy link

@levonet levonet commented Apr 6, 2017

Метод pth.extname(file) не позволял фильтровать файлы по расширению с несколькими точками, например .ru.md.

@coveralls
Copy link

coveralls commented Apr 6, 2017

Coverage Status

Coverage increased (+2.9%) to 94.582% when pulling d0906ed on levonet:ext into 257a18a on hcodes:master.

return !fileExtensions.length ||
(fileExtensions.length === 1 && !fileExtensions[0]) ||
fileExtensions.indexOf(ext) !== -1;
let result = !fileExtensions.length || false;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const buf = fileExtensions.filter(Boolean);
return !buf.length || buf.some(ext => ext === file.slice(ext.length * -1));

@hcodes
Copy link
Owner

hcodes commented Apr 7, 2017

#67

v3.2.0

@hcodes hcodes closed this Apr 7, 2017
@levonet levonet deleted the ext branch April 8, 2017 20:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants