0.1.0 • Published 9 years ago

dash-2-camel v0.1.0

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

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