New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cob

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cob

read and manipulate json

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-53.33%
Maintainers
1
Weekly downloads
 
Created
Source

cob

Build Status npm install npm version js-standard-style License

Easily read and manipulate JSON

installation

npm install -g cob

usage

cat package.json | cob -g bin.cob

outputs

"./bin.cob.js"

cob -i package.json -s description='"this module is dumb"'

outputs

...

  "description": "this module is dumb"

...

options

  • --input, -i, -f <file> Read from input <file>
  • --output, -o <file> Output to <file>
  • --get, -g <dotpath> Return the value at <dotpath>
  • --set, -s <dotpath>=<value> Set the value at <dotpath>

note

Extra arguments not specified by a flag will be considered either a get or a set based on the presence or lack thereof of an equal sign.

For example, cob name is equivalent to cob --get name and cob name='"dummy"' is the same as doing cob --set name='"dummy"'.

as a module

var cob = require('cob')

and use it as so:

cob()

a through stream that pretty prints the JSON you throw at it

cob('dot.paths') || cob(['dot.paths', 'a.plenty'])

a through stream that returns newline separated values of each dotpath resolved in the JSON you throw at it

cob({'dot.path': "new value", 'a.plenty': true})

a through stream that outputs all your JSON with the changes made as specified

license

MIT

Keywords

FAQs

Package last updated on 16 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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