@pechynho/stimulus-typescript 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/src/utils.ts +1 -1
package/dist/utils.js
CHANGED
|
@@ -7,7 +7,7 @@ export const capitalize = (value) => {
|
|
|
7
7
|
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
8
8
|
};
|
|
9
9
|
export const isActionEvent = (value) => {
|
|
10
|
-
return value instanceof Event && 'params' in value && typeof value.params
|
|
10
|
+
return value instanceof Event && 'params' in value && typeof value.params === 'object';
|
|
11
11
|
};
|
|
12
12
|
export const getController = (app, element, identifier) => {
|
|
13
13
|
return app.getControllerForElementAndIdentifier(element, identifier);
|
package/package.json
CHANGED
package/src/utils.ts
CHANGED
|
@@ -11,7 +11,7 @@ export const capitalize = (value: string): string => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const isActionEvent = (value: any): value is ActionEvent => {
|
|
14
|
-
return value instanceof Event && 'params' in value && typeof value.params
|
|
14
|
+
return value instanceof Event && 'params' in value && typeof value.params === 'object';
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export const getController = <T extends Controller>(app: Application, element: HTMLElement, identifier: string): T | null => {
|