string-convert
String convertions
Last updated 10 years ago by akiran .
MIT · Original npm · Tarball · package.json
$ gnpm install string-convert 
SYNC missed versions from official npm registry.

string-convert

Set of string conversion functions

Installation

npm install string-convert --save

Methods

hyphen2camel

Converts hyphenated string to camelcase string

Example:

var hyphen2camel = require('string-convert/hyphen2camel');
hyphen2camel('min-width'); // minWidth
hyphen2camel('-moz-transition'); // MozTransition

camel2hyphen

Converts camel case string to hyphenated string

Example:

var camel2hyphen = require('string-convert/camel2hyphen');
camel2hyphen('minWidth');  // min-width
camel2hyphen('MozTransition'); //-moz-transition 

Current Tags

  • 0.2.1                                ...           latest (10 years ago)

3 Versions

  • 0.2.1                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |