Skip to content

Commit

Permalink
docs: fix JSDoc parameter alignment
Browse files Browse the repository at this point in the history
johnhooks committed Mar 13, 2023
1 parent 7264fee commit 3a60f96
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/get-path.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
*
* @param {Record<string, any>} object Lookup object
* @param {string} path Path to resolve
* @return {*=} Resolved value
* @return {*=} Resolved value
*/
export default function getPath(object, path) {
const segments = path.split('.');
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ const getDocument = (() => {
*
* @param {string|Element} source Source content
* @param {Matcher} matchers Matcher function or object of matchers
* @return {any} Matched value(s), shaped by object
* @return {any} Matched value(s), shaped by object
*/
export function parse(source, matchers) {
if (!matchers) {
@@ -123,8 +123,8 @@ export function attr(selector, name) {
*
* @see prop()
*
* @param {string=} selector Optional selector
* @return {(node: Element) => string} Matcher which returns innerHTML
* @param {string=} selector Optional selector
* @return {(node: Element) => string} Matcher which returns innerHTML
*/
export function html(selector) {
return prop(selector, 'innerHTML');
@@ -135,8 +135,8 @@ export function html(selector) {
*
* @see prop()
*
* @param {string} selector Optional selector
* @return {(node: Element) => string} Matcher which returns text content
* @param {string} selector Optional selector
* @return {(node: Element) => string} Matcher which returns text content
*/
export function text(selector) {
return prop(selector, 'textContent');
@@ -151,7 +151,7 @@ export function text(selector) {
*
* @param {string} selector Selector to match
* @param {Matcher} matchers Matcher function or object of matchers
* @return Matcher function which returns an array of matched value(s)
* @return Matcher function which returns an array of matched value(s)
*/
export function query(selector, matchers) {
/** @type {(node: Element) => any[]} */

0 comments on commit 3a60f96

Please sign in to comment.