UNPKG

nope-js-browser

Version:

NoPE Runtime for the Browser. For nodejs please use nope-js-node

20 lines (19 loc) 830 B
import { SPLITCHAR } from "./objectMethods"; export function getPropertyPath(identifier, name) { return `${identifier}${SPLITCHAR}properties${SPLITCHAR}${name}`; } export function isPropertyPathCorrect(identifier, path) { return path.startsWith(`${identifier}${SPLITCHAR}properties${SPLITCHAR}`); } export function getMethodPath(identifier, name) { return `${identifier}${SPLITCHAR}methods${SPLITCHAR}${name}`; } export function isMethodPathCorrect(identifier, path) { return path.startsWith(`${identifier}${SPLITCHAR}methods${SPLITCHAR}`); } export function getEmitterPath(identifier, name) { return `${identifier}${SPLITCHAR}events${SPLITCHAR}${name}`; } export function isEmitterPathCorrect(identifier, path) { return path.startsWith(`${identifier}${SPLITCHAR}events${SPLITCHAR}`); }