0.0.4 • Published 5 years ago

change-prop-case v0.0.4

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

change-prop-case

Changes all properties case.

Installation

npm install -S change-prop-case

Usage

import { camelProps, snakeProps, changeProps } from "chage-prop-case";
// or
const { changeProps, snakeProps, camelProps } = require("change-prop-case");

snakeProps({ propA: { propX: [{ propY: 1 }] } });
// => { prop_a: { prop_x: [{ prop_y: 1 }] }}

camelProps({ prop_a: { prop_x: [{ prop_y: 1 }] } });
// => { propA: { propX: [{ propY: 1 }] }}

const changeCase = require("change-case");
changeProps({ propA: { propX: [{ propY: 1 }] } }, changeCase.paramCase);
// => { "prop-a": { "prop-x": [{ "prop-y": 1 }] }}
0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago