Code Monkey home page Code Monkey logo

json-pascal-case's Introduction

:package: json-pascal-case

๐Ÿ“ฆ json-pascal-case

A simple JSON parser that converts keys to pascal case

Issues GitHub pull requests GitHub Downloads GitHub Total Downloads GitHub release

Report Bug Request Feature

Systems on which it has been tested:

Macos Ubuntu Windows

Did you like the project? Please, considerate a donation to help improve!

A simple JSON parser that converts keys to pascal caseโœจ

Getting started

codecov

Node.js build and publish package

Installation

Install with yarn or npm: yarn or npm:

# yarn
yarn add json-pascal-case
# npm
npm i json-pascal-case --save

Import the lib with es6 or cjs

// es6
import jsonPascalCase from 'json-pascal-case';
// cjs
const jsonPascalCase = require('json-pascal-case');

Usage examples

transformArrayOfObjects

#!/usr/bin/env node
import jsonPascalCase from 'json-pascal-case';

const array_of_objects = [
    {
        test: 'test',
        test2: 'test2',
    },
    {
        test: 'test',
        test2: 'test2',
    },
];

const result = jsonPascalCase.transformArrayOfObjects(array_of_objects);

console.log(result);

transformObject

#!/usr/bin/env node
import jsonPascalCase from 'json-pascal-case';

const my_object = {
    test: 'test',
    test2: 'test2',
};

const result = jsonPascalCase.transformObject(my_object);

console.log(result);

transformString

#!/usr/bin/env node
import jsonPascalCase from 'json-pascal-case';

const my_string = "my text in lower case";

const result = jsonPascalCase.transformString(my_string);

console.log(result);

transformArrayOfStrings

#!/usr/bin/env node
import jsonPascalCase from 'json-pascal-case';

const my_strings = ["text1", "text2"];

const result = jsonPascalCase.transformArrayOfStrings(my_strings);

console.log(result);

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a โญ๏ธ if this project helped you!

Or buy me a coffee ๐Ÿ™Œ๐Ÿพ

๐Ÿ“ License

Copyright ยฉ 2022 Hebert F Barros.
This project is MIT licensed.

json-pascal-case's People

Contributors

dependabot[bot] avatar hebertcisco avatar snyk-bot avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.