Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rea-jet/rea-xml2js

Package Overview
Dependencies
Maintainers
6
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rea-jet/rea-xml2js

REA bidirectional XML to JSON converter

  • 2.2.0
  • npm
  • Socket score

Version published
Weekly downloads
25
Maintainers
6
Weekly downloads
 
Created
Source

rea-xml2js

install

npm install git+ssh://git@rj-git.rea.de/web/web-modules/rea-xml2js.git

usage

var xml2js = require('rea-xml2js')();

// xml to json
var xml = '<some a="1">2</some>';
xml2js.toJSON(xml).then(function(result) {
  console.log(result.some._.a, result.some._$); // output: 1 2
});

// json to xml
var json = {
  some: {
    _: { a: '1' },
    _$: '2'
  }
};
xml2js.toXML(json).then(function(result) {
  console.log(result);
  // output:
  // <?xml .. ?>
  // <some a="2">1</some>
});

tests

git clone ssh://git@rj-git.rea.de/web/web-modules/rea-xml2js.git
cd rea-xml2js
npm install
npm test

FAQs

Package last updated on 06 Mar 2018

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