0.0.8 • Published 8 years ago

string-helper v0.0.8

Weekly downloads
47
License
-
Repository
github
Last release
8 years ago

string-helper

Build Status Coverage Status Dependencies Dev dependencies

Do things that lodash doesn't.

How to install

npm install string-helper

Usage

renameKeys(obj, fn = lodash.snakeCase)

import { renameKeys, pascalCase } from 'string-helper';

const obj = { camelCase: 'camelCase' };

console.log(renameKeys(obj));
// => { camel_case: 'cameCase' };

console.log(renameKeys(obj, pascalCase));
// => { PascalCase: 'cameCase' };

pascalCase(str)

import { pascalCase } from 'string-helper';

const str = 'snake_case'.

console.log(pascalCase(str));
// => 'SnakeCase';