A tiny tool to invert extglobs.
$ npm install --save extglob-invert
const invert = require('extglob-invert');
invert('/path/to/file') // !(path/to/file)
invert(' ! !( !/path/to/file)') // /path/to/file
invert('!**') // **
invert('!(!!(**))') // **
invert(['file1', '!file2']) // ['!(file1)', 'file2']
You just have to clone the repo and run
$ npm test
$ npm run coverage