Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/xml_renderer/mod.ts>default#optimize

An npm/browser module for easy matching XML and XPath to React Components and other stuff
Go to Latest
method default.prototype.optimize
import { default } from "https://deno.land/x/xml_renderer@5.0.7/mod.ts";

Reorders the sets based on XPath test specificity so that an Array#find finds the closest matching test first.

For example <b /> could match tests self::b as well as self::b[not(child::*)], but the latter is more specific so it wins.

This method is private because it is already called at all relevant times. Calling it again will normally not yield any different results.