@alu0101240374/espree-logging-module-alu0101240374

0.2.2

util

Universidad de La Laguna Escuela Superior de Ingenieria y Tecnologia Grado de Ingenieri Informatica

util
Author: Gabriel Garcia Jaubert

addLogging

Function that reads the ast-tree, locates the function node and and calls addBeforeCode for adding the log.

addLogging(code: any, pattern: any, Code: code, Pattern: string)
Parameters
code (any)
pattern (any)
Code (code) code we want to add logs on
Pattern (string) Only functions that match the pattern substring will be add

addBeforeCode

Receives a node, creates the console message, creates a ast node and concatenates it to the received node

addBeforeCode(node: any, Code: code, Pattern: string)
Parameters
node (any)
Code (code) code we want to add loggs on
Pattern (string) Only functions that match the pattern substring will be logged