Socket
Book a DemoInstallSign in
Socket

cssauron-json

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

cssauron-json

css sauron config for json

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

cssauron-json

CSSauron preconfigured for JSON nodes emitted from json-parse-stream.


var css = require('cssauron-json')
  , json = require('json-parse-stream')()

var sel = css('.key > .val')

json.write('{"key": {"val": 3, "key": 2}}')
    .on('data', function(node) {
      if(sel(node)) {
        console.log(node)  // emits for top level key only
      }
    })

api

.class maps to the key attribute of a node. tag queries may be object, array, string, number, null, boolean. > operators are allowed, but ~ and + are not.

License

MIT

Keywords

cssauron

FAQs

Package last updated on 24 Oct 2013

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