Skip to content

Instantly share code, notes, and snippets.

@juliandavidmr
Created February 8, 2017 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliandavidmr/d6c24611a6fb0b33e78ac1f05e7d4ac2 to your computer and use it in GitHub Desktop.
Save juliandavidmr/d6c24611a6fb0b33e78ac1f05e7d4ac2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
'use strict';
var meow = require('meow');
var catNames = require('./');
var cli = meow([
'Examples',
' $ cat-names',
' Max',
'',
' $ cat-names --all',
' Abby',
' Angel',
' ...',
'',
'Options',
' --all Get all names instead of a random name'
]);
console.log(cli.flags.all ? catNames.all.join('\n') : catNames.random());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment