0.0.1 • Published 8 years ago

labset-kingdom-js v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
bitbucket
Last release
8 years ago

labset-kingdom-js

experimenting with DOM and reflection, alternative fro xml2json conversions.

install it

npm install labset-kingdom-js --save

use it

let KingDOM = require('kingdomjs');

let atomString = '<entry><id>someId</id><title type="text">some title</title></entry>';
let atomEntry = new KingDOM(atomString).entry[0];

console.log(atomEntry.id[0]['#text']);      // out : someId
console.log(atomEntry.title[0]['#text']);   // out : some title
console.log(atomEntry.title[0]['@type']);   // out : text


// serialize to string
console.log(atomEntry['@toString']);

dev

npm run test:watch          # run tests and watch for changes
npm run coverage            # generate coverage reports
npm run lint                # generate lint report

licence

Apache-2.0

0.0.1

8 years ago