# Today's npm package: is-glob

Today's npm package is  [is-glob](https://www.npmjs.com/package/is-glob) 

While creating Node.js based CLIs which is working with Files and Directories; you might wanna work with  [Glob](https://github.com/begin/globbing) .

And when working with Glob, you need to know when the passed argument is a glob or not.

The package is-glob will help you in this case and it will return `true` only when the passed string is a Glob

```js
const fs = require('fs');
const path = require('path');
const isGlob = require('is-glob');
const file = process.argv.slice(2);

if (isGlob(file)) {
  // process the Glob
  return;
}

// process the file
const fileData = fs.readFileSync(path.resolve(process.cwd(), file));
```

Stay tuned for tomorrow's package of the Day.
