Skip to content

Instantly share code, notes, and snippets.

@SydBal
Created January 14, 2020 08:35
Show Gist options
  • Save SydBal/264a390d3fc34c9ca788378182a04775 to your computer and use it in GitHub Desktop.
Save SydBal/264a390d3fc34c9ca788378182a04775 to your computer and use it in GitHub Desktop.
NodeJS: Mapping argv to global
import { argv } from 'yargs'
Object.entries(argv).forEach(([key, value]) => { global[key] = value })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment