1.0.1 • Published 6 years ago

ninjapiratica-typescript-helpers v1.0.1

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

ninjapiratica-typescript-helpers

A module with simple helpers you probably don't need. A server may return results with PascalCasing and you want to use camelCasing. This will convert the objects for you to use. A server may expect PascalCasing and you use camelCasing. This will convert the objects for you as well.

Installation

npm install ninjapiratica-typescript-helpers --save

Usage

Typescript

import { convertCamelCase, convertPascalCase } from 'typescript-helpers';

var obj = {
    Key: 'value',
    ...
};

var newObj = convertToCamelCase(obj);
newObj should be
{
    key: 'value',
    ...
}