dasherize

WebJar for dasherize

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

dasherize
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

dasherize
WebJar for dasherize
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/shahata/dasherize

Download dasherize

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/dasherize/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>dasherize</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/dasherize/
implementation 'org.webjars.npm:dasherize:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/dasherize/
implementation ("org.webjars.npm:dasherize:2.0.0")
'org.webjars.npm:dasherize:jar:2.0.0'
<dependency org="org.webjars.npm" name="dasherize" rev="2.0.0">
  <artifact name="dasherize" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='dasherize', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "dasherize" % "2.0.0"
[org.webjars.npm/dasherize "2.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

dasherize

recursively transform key strings to dash-case

build status

browser support

example

var dasherize = require('dasherize');
var obj = {
  feeFieFoe: 'fum',
  beepBoop: [
    { 'abcXyz': 'mno' },
    { 'fooBar': 'baz' }
  ]
};
var res = dasherize(obj);
console.log(JSON.stringify(res, null, 2));

output:

{
  "fee-fie-foe": "fum",
  "beep-boop": [
    {
      "abc-xyz": "mno"
    },
    {
      "foo-bar": "baz"
    }
  ]
}

methods

var dasherize = require('dasherize')

dasherize(obj)

Convert the key strings in obj to dash-case recursively.

dasherize(str)

Convert the string to dash-case.

install

With npm do:

npm install dasherize

To use in the browser, use browserify.

license

derives directly from camelize

MIT

Versions

Version
2.0.0