change-prop-case
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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 }] }}

Readme

Keywords

none

Package Sidebar

Install

npm i change-prop-case

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

97.4 kB

Total Files

10

Last publish

Collaborators

  • sou-i