java-to-js

1.0.0 • Public • Published

java-to-js

NPM version build status Test coverage npm download

Easy way to wrap java object to js object, the reverse of js-to-java

In hessian.js, when read with type we get java classname with js object, so convert it to plain js object so we can use it normally.

Install

NPM

$ npm install java-to-js

Usage

const java2js = require('java-to-js');
 
let java = {
  $class: 'xxxx',
  $: {
    foo: 'bar',
    bar: {
      $class: 'int',
      $: 3,
    },
  },
};
java2js(java);
// => {foo: 'bar', bar: 3}

License

MIT

Package Sidebar

Install

npm i java-to-js

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • coolme200
  • fengmk2
  • shaoshuai0102