dash-2-camel

0.1.0 • Public • Published

NPM Version Build Status

dash-2-camel

A function to transform dash-style strings to camelCase ones

Install

npm i --save dash-2-camel

Usage

describe( 'dash-2-camel', function () {
  it( 'should transform dash-style strings to camelCase ones', function () {
    var dash2Camel = require( 'dash-2-camel' );
    var str = 'dash-style-str';
    var expected = 'dashStyleStr';
 
    var actual = dash2Camel( str );
    expect( actual ).to.equal( expected )
  } );
 
  it( 'should ignore multiple dashes', function () {
    var dash2Camel = require( 'dash-2-camel' );
    var str = 'dash--style--str';
    var expected = 'dashStyleStr';
 
    var actual = dash2Camel( str );
    expect( actual ).to.equal( expected )
  } );
} );

License

MIT

Changelog

Changelog

Package Sidebar

Install

npm i dash-2-camel

Weekly Downloads

8

Version

0.1.0

License

MIT

Last publish

Collaborators

  • royriojas