Skip to content

Commit

Permalink
chore: add example
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentMolinie committed Dec 19, 2021
1 parent af67a6d commit 5ec705f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/rules/block-indentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,14 @@ function isControlChar(char) {
}

/**
* This function allows to get a node inside a node given a path
*
* @param {Node} node
* @param {String[]} path - A list of property to search for in the node
* @returns {Node}
*
* @example
* get(node, ['program', 'body', 1]) === node.program.body[1]
*/
function get(node, path) {
let value = node;
Expand Down

0 comments on commit 5ec705f

Please sign in to comment.