Catalog npm
Back to packageRELEASE DETAILS

0.1.6

npm

1tree-json

Convert JSON objects to and from 1tree instances

1treejson
Published24 Jan 2017
Direct dependencies6
Transitive dependenciesNot calculated

README

Current package documentation

1tree-json

Allows conversion between JSON objects and 1tree instances

const JsonTree = require( '1tree-json' )

const jsonData = require( './test-data.json' )

const tree = JsonTree( jsonData )

const numbers = tree.findAll( node => node.isNumber() )

numbers.forEach( numberNode => {
  const value = node.value()

  value.nodeValue *= 2

  node.value( value )
})

const newData = tree.toJson()

console.log( JSON.stringify( newData, null, 2 ) )

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 6

Native requirements
6 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
1tree
Environment
{
  "local_name": "1tree",
  "alias": false,
  "peer_metadata": null
}
^0.4.3runtime
mtype
Environment
{
  "local_name": "mtype",
  "alias": false,
  "peer_metadata": null
}
^0.1.2runtime
babel-preset-es2015
Environment
{
  "local_name": "babel-preset-es2015",
  "alias": false,
  "peer_metadata": null
}
^6.18.0development
gulp
Environment
{
  "local_name": "gulp",
  "alias": false,
  "peer_metadata": null
}
^3.9.1development
gulp-babel
Environment
{
  "local_name": "gulp-babel",
  "alias": false,
  "peer_metadata": null
}
^6.1.2development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^3.2.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "23ca052671e165ce92481783f2bb00d04e636b20",
  "tarball": "https://registry.npmjs.org/1tree-json/-/1tree-json-0.1.6.tgz",
  "integrity": "sha512-F2gsHX7YtMgdAbZw3TCk1spGI/KioRN7W7saso1kcWmkzEn6/+4bzOdW3Kqz9WP4pxZmhHPHQCV0lTC30jpiSw==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEYCIQDPxwkGUCK8gJzPv5z+eJsws4BJnZUeJqzksEm5LZGbXQIhAP2kpgLcMIXA9HTwGbN4dmPgXCIv3rN82a2I5iopQnSA"
    }
  ]
}

Repository

PENDING
mojule/1tree-json

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:39 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:321a0cb6dc87634eb03cc35888d28095b49600be3221fde381706110199efae9

Other collected versions

0.2.69 Mar0.2.59 Mar0.2.416 Feb0.2.38 Feb0.2.28 Feb0.2.18 FebView all collected versions →