Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moggie

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moggie - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

index.js
'use strict'
const meow = require('meow')

@@ -8,7 +7,10 @@

argv: process.argv.slice(2),
help: false
help: false,
minimistOptions: {}
}, opts)
if (cli === undefined) {
cli = meow(opts)
const minimistOptions = opts.minimistOptions
delete opts.minimistOptions
cli = meow(opts, minimistOptions)
}

@@ -15,0 +17,0 @@

{
"name": "moggie",
"version": "1.0.0",
"version": "1.0.1",
"description": "moggie wraps a lot meow to support subcommands.",

@@ -24,2 +24,3 @@ "main": "index.js",

"xo": {
"esnext": true,
"semicolon": false,

@@ -26,0 +27,0 @@ "rules": {

import test from 'ava'
import meow from 'meow'

@@ -45,1 +46,42 @@ import m from './'

})
test.cb('adding minimistOptions should change minimist behavior', t => {
m({
argv: ['foo', '--foo-bar', '-u', 'cat', '--', 'unicorn', 'cake'],
minimistOptions: {
'--': true
},
subcommands: {
foo: {
callback: cli => {
console.dir(cli)
t.deepEqual(cli.flags['--'], ['unicorn', 'cake'])
t.end(false)
}
}
},
callback: () => t.end(true)
})
})
test('meows double dash behavior', t => {
const cli = meow({
argv: ['foo', '--foo-bar', '-u', 'cat', '--', 'unicorn', 'cake'],
help: `
Usage
foo <input>
`
}, {
// alias: {u: 'unicorn'},
// default: {meow: 'dog'},
'--': true
})
t.is(cli.input[0], 'foo')
t.true(cli.flags.fooBar)
// t.is(cli.flags.meow, 'dog')
// t.is(cli.flags.unicorn, 'cat')
t.deepEqual(cli.flags['--'], ['unicorn', 'cake'])
t.is(cli.pkg.name, 'meow')
console.dir(cli)
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc