ember-cli-string-utils

WebJar for ember-cli-string-utils

License

License

ISC
Categories

Categories

CLI User Interface
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

ember-cli-string-utils
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

ember-cli-string-utils
WebJar for ember-cli-string-utils
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/ember-cli/ember-cli-string-utils

Download ember-cli-string-utils

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/ember-cli-string-utils/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>ember-cli-string-utils</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/ember-cli-string-utils/
implementation 'org.webjars.npm:ember-cli-string-utils:1.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/ember-cli-string-utils/
implementation ("org.webjars.npm:ember-cli-string-utils:1.1.0")
'org.webjars.npm:ember-cli-string-utils:jar:1.1.0'
<dependency org="org.webjars.npm" name="ember-cli-string-utils" rev="1.1.0">
  <artifact name="ember-cli-string-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='ember-cli-string-utils', version='1.1.0')
)
libraryDependencies += "org.webjars.npm" % "ember-cli-string-utils" % "1.1.0"
[org.webjars.npm/ember-cli-string-utils "1.1.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.

ember-cli-string-utils

Library for string utils extracted for other addons and blueprints.

Installation

$ npm i ember-cli-string-utils

Code Example

How to use in project :

var stringUtils = require("ember-cli-string-utils");

stringUtils.camelize('action_name');	   // 'actionName'
stringUtils.camelize('css-class-name');    // 'cssClassName'
stringUtils.camelize('my favorite items'); // 'myFavoriteItems'
stringUtils.camelize('My Favorite Items'); // 'myFavoriteItems'

Usage

1) decamelize:

Converts a camelized string into all lowercase separated by underscores.

  decamelize('innerHTML');         // 'inner_html'
  decamelize('action_name');       // 'action_name'
  decamelize('css-class-name');    // 'css-class-name'
  decamelize('my favorite items'); // 'my favorite items'

2) dasherize:

Replaces underscores, spaces, or camelCase with dashes.

  dasherize('innerHTML');         // 'inner-html'
  dasherize('action_name');       // 'action-name'
  dasherize('css-class-name');    // 'css-class-name'
  dasherize('my favorite items'); // 'my-favorite-items'

3) camelize:

Returns the lowerCamelCase form of a string.

  camelize('innerHTML');          // 'innerHTML'
  camelize('action_name');        // 'actionName'
  camelize('css-class-name');     // 'cssClassName'
  camelize('my favorite items');  // 'myFavoriteItems'
  camelize('My Favorite Items');  // 'myFavoriteItems'

4) classify:

Returns the UpperCamelCase form of a string.

  'innerHTML'.classify();          // 'InnerHTML'
  'action_name'.classify();        // 'ActionName'
  'css-class-name'.classify();     // 'CssClassName'
  'my favorite items'.classify();  // 'MyFavoriteItems'

5) underscore:

More general than decamelize. Returns the lower_case_and_underscored form of a string.

  'innerHTML'.underscore();          // 'inner_html'
  'action_name'.underscore();        // 'action_name'
  'css-class-name'.underscore();     // 'css_class_name'
  'my favorite items'.underscore();  // 'my_favorite_items'

6) capitalize:

Returns the Capitalized form of a string.

  'innerHTML'.capitalize()         // 'InnerHTML'
  'action_name'.capitalize()       // 'Action_name'
  'css-class-name'.capitalize()    // 'Css-class-name'
  'my favorite items'.capitalize() // 'My favorite items'

Author

ember-cli contributors

License

ISC

org.webjars.npm

ember-cli

Versions

Version
1.1.0
1.0.0