@codemod-utils/ember
Advanced tools
Comparing version 1.1.4 to 2.0.0
@@ -1,3 +0,3 @@ | ||
export * from './entity-name/camelize.js'; | ||
export * from './entity-name/classify.js'; | ||
export * from './entity-name/double-colonize.js'; | ||
export * from './ember/entity-name/camelize.js'; | ||
export * from './ember/entity-name/double-colonize.js'; | ||
export * from './ember/entity-name/pascalize.js'; |
@@ -1,3 +0,3 @@ | ||
export * from './entity-name/camelize.js'; | ||
export * from './entity-name/classify.js'; | ||
export * from './entity-name/double-colonize.js'; | ||
export * from './ember/entity-name/camelize.js'; | ||
export * from './ember/entity-name/double-colonize.js'; | ||
export * from './ember/entity-name/pascalize.js'; |
{ | ||
"name": "@codemod-utils/ember", | ||
"version": "1.1.4", | ||
"version": "2.0.0", | ||
"description": "Utilities for Ember", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -15,10 +15,5 @@ [![This project uses GitHub Actions for continuous integration.](https://github.com/ijlee2/codemod-utils/actions/workflows/ci.yml/badge.svg)](https://github.com/ijlee2/codemod-utils/actions/workflows/ci.yml) | ||
The methods are built with the **entity name** in mind, a string (possibly with hyphens and forward slashes) that represents a set of related files in Ember. | ||
(For example, the `<Ui::Button>` component has the entity name `'ui/button'`. In the Ember source code, you may see variable names like `entityName` or `moduleName`.) | ||
### camelize | ||
Returns a string in camel-case. | ||
Converts an entity name to camel case. Used for naming the function that is associated with the entity. | ||
@@ -28,31 +23,31 @@ ```ts | ||
const newValue = camelize('css-class-name'); | ||
const newValue = camelize('ui/form/generate-error-message'); | ||
// 'cssClassName' | ||
// 'uiFormGenerateErrorMessage' | ||
``` | ||
### classify | ||
### doubleColonize | ||
Returns a string that can be used to name a JavaScript `class` (a.k.a. Pascal case). | ||
Converts an entity name to double colon (`::`) case. Used for writing the angle bracket syntax or the signature for a component. | ||
```ts | ||
import { classify } from '@codemod-utils/ember'; | ||
import { doubleColonize } from '@codemod-utils/ember'; | ||
const newValue = classify('ui/button'); | ||
const newValue = doubleColonize('ui/form/input'); | ||
// 'UiButton' | ||
// 'Ui::Form::Input' | ||
``` | ||
### doubleColonize | ||
### pascalize | ||
Returns a string associated with the angle bracket syntax for components. | ||
Converts an entity name to Pascal case. Used for naming the class that is associated with the entity. | ||
```ts | ||
import { doubleColonize } from '@codemod-utils/ember'; | ||
import { pascalize } from '@codemod-utils/ember'; | ||
const newValue = doubleColonize('ui/button'); | ||
const newValue = pascalize('ui/form/input'); | ||
// 'Ui::Button' | ||
// 'UiFormInput' | ||
``` | ||
@@ -59,0 +54,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7603
67
1