2022-01-10 06:52:05 +00:00
|
|
|
import { SPLITCHAR } from "./objectMethods";
|
|
|
|
|
2020-11-23 06:09:31 +00:00
|
|
|
export function getPropertyPath(identifier: string, name: string) {
|
2022-01-10 06:52:05 +00:00
|
|
|
return `${identifier}${SPLITCHAR}properties${SPLITCHAR}${name}`;
|
2020-11-09 06:42:24 +00:00
|
|
|
}
|
|
|
|
|
2020-11-23 06:09:31 +00:00
|
|
|
export function isPropertyPathCorrect(identifier: string, path: string) {
|
2022-01-10 06:52:05 +00:00
|
|
|
return path.startsWith(`${identifier}${SPLITCHAR}prop${SPLITCHAR}`);
|
2020-11-09 06:42:24 +00:00
|
|
|
}
|
|
|
|
|
2020-11-23 06:09:31 +00:00
|
|
|
export function getMethodPath(identifier: string, name: string) {
|
2022-01-10 06:52:05 +00:00
|
|
|
return `${identifier}${SPLITCHAR}methods${SPLITCHAR}${name}`;
|
2020-11-09 06:42:24 +00:00
|
|
|
}
|
|
|
|
|
2020-11-23 06:09:31 +00:00
|
|
|
export function isMethodPathCorrect(identifier: string, path: string) {
|
2022-01-10 06:52:05 +00:00
|
|
|
return path.startsWith(`${identifier}${SPLITCHAR}methods${SPLITCHAR}`);
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getEmitterPath(identifier: string, name: string) {
|
|
|
|
return `${identifier}${SPLITCHAR}events${SPLITCHAR}${name}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function isEmitterPathCorrect(identifier: string, path: string) {
|
|
|
|
return path.startsWith(`${identifier}${SPLITCHAR}events${SPLITCHAR}`);
|
2021-12-04 07:25:26 +00:00
|
|
|
}
|