Skip to content

jonathanwoahn/changeCase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE

This is not my repo, the original was removed from github, and many of my projects used it. So I've copied it here so that I can reference it as needed.

Change Case

Bower version

Convert strings between camelCase, PascalCase, Title Case, snake_case, param-case, lowercase, UPPERCASE, CONSTANT_CASE and more.

Attention

This is a fork of blakeembrey/change-case created specifically to add support for bower, angular and just dropping script on the page. If you are interested in NPM package and want to use it either in Node.js environment or with Browserify - please visit original package's page. If you are looking for documentation or want to submit an issue which is not specific to in-browser usage please proceed to aforementioned page as well.

Usage

Installation

bower install change-case --save

Or just include ./dist/change-case.js script on your page.

Angular

If you use angular than you than have to include module 'change-case' in your module's dependencies:

angular.module('yourApp', ['change-case'])

Now you can use changeCase service like that:

angular.module('yourApp').controller('yourController',
  function($scope, changeCase)
    <...>
    $scope.paramCaseString = changeCase.paramCase('TestString');
    //$scope.paramCaseString will equal 'test-string'
  })

Not angular

Global variable changeCase will be available for your use.

var paramCaseString = changeCase.paramCase('TestString');
//paramCaseString will equal 'test-string'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published