API
Types de lieux
Chemin
16 min
chemin les tableaux sont une liste d'index qui décrivent la position exacte d'un nœud dans un arbre de nœuds slate bien qu'ils soient généralement relatifs à la racine éditeur objet, ils peuvent être relatifs à n'importe quel nœud objet type path = number\[] docid 3fsk1ryt6trkonurtehol docid 3fsk1ryt6trkonurtehol docid 3fsk1ryt6trkonurtehol docid 3fsk1ryt6trkonurtehol méthodes statiques méthodes de récupération path ancestors(path path, options { reverse? boolean } = {}) path\[] obtenez une liste des chemins ancêtres pour un chemin donné les chemins sont triés du plus profond au plus superficiel cependant, si le reverse true option est passée, ils sont inversés path common(path path, another path) path obtenez le chemin ancêtre commun de deux chemins path compare(path path, another path) 1 | 0 | 1 comparez un chemin à un autre, renvoyant un entier indiquant si le chemin était avant, à, ou après l'autre remarque deux chemins de longueurs inégales peuvent toujours recevoir un 0 résultat si l'un est directement au dessus ou en dessous de l'autre si vous voulez une correspondance exacte, utilisez \[\[path equals]] à la place path niveaux(path path, options?) path\[] obtenez une liste de chemins à chaque niveau jusqu'à un chemin remarque c'est la même chose que path ancêtres , mais en incluant le chemin lui même les chemins sont triés du plus superficiel au plus profond cependant, si l' reverse true option est passée, ils sont inversés options {reverse? boolean} path suivant(path path) path étant donné un chemin, obtenez le chemin vers le nœud frère suivant path parent(path path) path étant donné un chemin, renvoyez un nouveau chemin faisant référence au nœud parent au dessus de celui ci path précédent(path path) path étant donné un chemin, obtenez le chemin vers le nœud frère précédent path relatif(path path, ancêtre path) path obtenez un chemin relatif à un ancêtre vérifier les méthodes vérifiez un attribut de chemin renvoie toujours un booléen path finitaprès(path path, unautre path) boolean vérifiez si un chemin se termine après l'un des index dans un autre path endsat(path path, another path) boolean vérifiez si un chemin se termine à l'un des index dans un autre path endsbefore(path path, another path) boolean vérifiez si un chemin se termine avant l'un des index dans un autre path equals(path path, another path) boolean vérifiez si un chemin est exactement égal à un autre path hasprevious(path path) boolean vérifiez si le chemin du nœud frère précédent existe path isafter(path path, another path) boolean vérifiez si un chemin est après un autre path isancestor(path path, another path) boolean vérifiez si un chemin est un ancêtre d'un autre path isbefore(path path, another path) boolean vérifiez si un chemin est avant un autre path ischild(path path, another path) boolean vérifiez si un chemin est un enfant d'un autre path iscommon(path path, another path) boolean vérifiez si un chemin est égal ou un ancêtre d'un autre path isdescendant(path path, another path) boolean vérifiez si un chemin est un descendant d'un autre path isparent(path path, another path) boolean vérifiez si un chemin est le parent d'un autre path ispath(value any) value is path vérifiez si une valeur implémente le path interface path issibling(path path, another path) boolean vérifiez si un chemin est un frère d'un autre méthode de transformation path transform(path path, operation operation, options?) path | null transformez un chemin par une opération options { affinity? 'forward' | 'backward' | null }
