Skip to content

ninjapiratica/typescript-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# 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
```sh
npm install ninjapiratica-typescript-helpers --save
```

## Usage

### Typescript

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

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

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