🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

json-casing

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-casing

A simple library to convert JSON objects from one case (ie Camel) to another (ie Pascal).

1.2.10
latest
Source
npm
Version published
Weekly downloads
2.4K
-29.34%
Maintainers
1
Weekly downloads
 
Created
Source

json-casing

Build Coverage Status npm version Package Size

Here are a few lines of code taken from a unit test so you can see how to use this very simple JavaScript.

import { JSONCasing } from 'json-casing';

var camelObj = { prop1: "prop 1", obj1: { deepProp1: "dp1", deepProp2: "dp2" } };
var pascalObj = { Prop1: "prop 1", Obj1: { DeepProp1: "dp1", DeepProp2: "dp2" } };

var result = JSONCasing.toCamel(pascalObj);

expect(JSON.stringify(result)).toBe(JSON.stringify(camelObj));

Keywords

JSON

FAQs

Package last updated on 24 Nov 2020

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