Socket
Socket
Sign inDemoInstall

ferl

Package Overview
Dependencies
6
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.1.0

11

index.js

@@ -83,3 +83,4 @@ #!/usr/bin/env node

.option('-e --extract [property]', 'extract a property from the response using a property chain e.g. \'supplier.primaryContact.tel\' ')
.option('-m --map [func]', 'map over an array, extracting property using a property chain e.g. \'name.email\'')
.option('-m --map [func]', `map over an array, extracting property using a property chain e.g. \'name.email\'
Will output multiple values if -m is specified multiple times`, collect, [])
// .option('-u [user]', 'authenticate with basic auth')

@@ -110,3 +111,9 @@ .action(function (url, options) {

if (options.map) {
json = json.map(item => extractProperty(item, options.map))
if (options.map.length === 1) {
json = json.map(item => extractProperty(item, options.map[0]))
} else {
json = json.map(item =>
options.map.map(propChain => extractProperty(item, propChain))
)
}
}

@@ -113,0 +120,0 @@ console.log(JSON.stringify(json, null, 2))

2

package.json
{
"name": "ferl",
"version": "1.0.0",
"version": "1.1.0",
"description": "The unholy union of fetch and curl",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc