Meeseeks.one

You're seeing just the function one, go back to Meeseeks module for more information.
Link to this function

one(queryable, selectors)

View Source

Specs

one(queryable(), selectors()) ::
  Meeseeks.Result.t() | nil | {:error, Meeseeks.Error.t()}

Returns a Result for the first node in the queryable (depth-first) matching a selector, or nil if none do.

Optionally accepts a Meeseeks.Context map.

Parses the source if it is not a Meeseeks.Document or Meeseeks.Result, and may return {:error, %Meeseeks.Error{type: parser} if there is a parse error.

If multiple selections are being ran on the same unparsed source, parse first to avoid unnecessary computation.

Examples

iex> import Meeseeks.CSS
iex> Meeseeks.one("<div id=main><p>1</p><p>2</p><p>3</p></div>", css("#main p"))
#Meeseeks.Result<{ <p>1</p> }>
Link to this function

one(queryable, selectors, context)

View Source

Specs