New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

completion

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

completion - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+2
-0
CHANGELOG.md
# completion changelog
1.0.1 - Rearranged documentation to make it more straightforward
1.0.0 - Reworked data structure to support options

@@ -3,0 +5,0 @@

+1
-1
{
"name": "completion",
"description": "Completion library for CLI commands",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/twolfson/completion",

@@ -6,0 +6,0 @@ "author": {

+13
-11

@@ -90,8 +90,19 @@ # completion [![Build status](https://travis-ci.org/twolfson/completion.png?branch=master)](https://travis-ci.org/twolfson/completion)

- If no `completion` is specified, we assume this is terminal and stop recursing
- Details on completion functions can be found below
- More info is available in the [`commands/option completion` section][command-completion-section]
- commands `Object[]` - Optional array of new `tree` instances to complete against
- This cannot exist on the same node as `completion` as they are contradictory
- completion `Function` - Optional completion function to determine results for a command
- Details on completion can be found below
- More info is available in the [`commands/option completion` section][command-completion-section]
[command-completion-section]: #commandoption-completion-functions
#### `completion.complete(params, cb)`
Get potential completion matches for given parameters
- params `Object` - Information similar to that passed in by `bash's` tab completion
- line `String` - Input to complete against (similar to `COMP_LINE`)
- cursor `Number` - Index within `line` of the cursor (similar to `COMP_POINT`)
- cb `Function` - Error-first callback function that receives matches
- `cb` should have a signature of `function (err, results)`
#### `command/option completion` functions

@@ -149,11 +160,2 @@ `options` and `commands` share a common completion function signature, `function (info, cb)`

#### `completion.complete(params, cb)`
Get potential completion matches for given parameters
- params `Object` - Information similar to that passed in by `bash's` tab completion
- line `String` - Input to complete against (similar to `COMP_LINE`)
- cursor `Number` - Index within `line` of the cursor (similar to `COMP_POINT`)
- cb `Function` - Error-first callback function that receives matches
- `cb` should have a signature of `function (err, results)`
#### `completion.resolveInfo(info, cb)`

@@ -160,0 +162,0 @@ Recursively find matches against the `Completion's tree` with a given `info`