A simple file input library to expand the functionality of the HTML5 file input.
$ npm install improved-file-input
const ifi = require('improved-file-input');
const attachments = document.querySelector('input[name="attachments"]');
const fileInput = new ifi(attachments, 5);
document.getElementById('demoForm').addEventListener('submit', (e) => {
e.preventDefault();
console.log('fileInput.files:', fileInput.files);
//=> 'fileInput.files:' (2) [File, File]
});