cssauron-json

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    3
  • 0.0.3
    0
  • 0.0.2
    0

Package Sidebar

Install

npm i cssauron-json

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • chrisdickinson