json-key-converter

1.0.0 • Public • Published

json-key-converter

A tiny tool to convert JSON key from Camel to Underscore or from Underscore to Camel.

NPM Version Downloads License

Usage

  var jsonKeyConverter = require('json-key-converter');

  var option = {
    camel: true
  }

  var newJson = jsonKeyConverter(json[, option]);

The conveter default convert json key to underscore standard. With setting option.camel = true, it will convert json key to camel case standard.

This is a tiny tool, it does not consider those special cases. (May perfect it in the future.)

License

MIT © Bo Li (solee.me)

Package Sidebar

Install

npm i json-key-converter

Weekly Downloads

77

Version

1.0.0

License

MIT

Last publish

Collaborators

  • solee