{"_id":"@alu0100987522/add-logging","_rev":"4-59ad596e9e5bdd2d18037d4b1e9ab5c2","name":"@alu0100987522/add-logging","dist-tags":{"latest":"1.0.2"},"versions":{"0.1.0":{"name":"@alu0100987522/add-logging","version":"0.1.0","description":"Add a console.log after entering a function.","author":{"name":"Aitor Hernández Sánchez","email":"alu0100987522@ull.edu.es","url":"https://github.com/alu0100987522"},"main":"./src/add-logging.js","bin":{"add-logging":"bin/exec-addlogging.js"},"scripts":{"test":"jest"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522.git"},"licenses":[{"type":"MIT","url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/blob/master/LICENSE"}],"bugs":{"url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/issues"},"homepage":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522#readme","dependencies":{"commander":"^7.1.0","escodegen":"^2.0.0","espree":"^7.3.1","estraverse":"^5.2.0"},"devDependencies":{"documentation":"^13.2.0","jest":"^26.6.3"},"gitHead":"e2d3607b542a89d27c770ca3e63eb12b139867a8","_id":"@alu0100987522/add-logging@0.1.0","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-Y/WM4YBBte6zF4zs/Lp+DckhPHy+t3fPDF0GkOBwnMh5JNV9sK3nBZK83k5H7aYUSWvWuUFdW2cuORz4MlbQ7Q==","shasum":"aef51645befa509c5b6a8be07ad7e1f424f6e596","tarball":"https://registry.npmjs.org/@alu0100987522/add-logging/-/add-logging-0.1.0.tgz","fileCount":7,"unpackedSize":13107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYK5uCRA9TVsSAnZWagAAJCYP/2n4gogHV9j0uA6PeZtH\nVByEX21zL2/f636g+yJhWLE7SlxuxXNr2IsuUO1eLLLWNTEBM1pRN1yQUnpH\nBT0l/KT1Rv+6KtMnpE26b6uuMq/f4zmrmAmmFSmbAxaHG+X8wqucRjxDvbk0\nX0v5JwjyoB/PUXHdjpdKOFbrlMpDaP9C5LAGV3qj8c6kFCR+xpSkDD9iOaXR\nDCmJyZuqnsu3lN7efWR6WbOrv4oRQn4ShdoqYDJu1SLXLpqeeWsSfhhd9eiP\nd4jTTeOeAOdK+kxULs1fptCwTPuCgmhlSg6Hh5R8MJQ2lwWCiLQ8SAx9zv8Y\nU6QuvTzVWl/ZLk7BkXY51c79fhZjlz3tsUMBdM6FQPJyqWqzvIdM+NLKnSKK\nXvC0VzyD561Q4ocRsHkctF3zNZRQ16XSRDTaEyaEVd+LuDI6DSmpPlcWsFYL\nKJo07PPuvH0ZB9Ma1u9wf+102BHjUqRdMcPwEQ7s8oINW7VJbQfDC5ZhhRAv\no79ayeMERDJuSUe7AfOO5fkxUzh8qeIYQ8F7p4fOrdxGtcBRLCTXxu57mrzS\noBui8Ua983PqOk22tS/tJXTS2Q3ZyacmuffbJXLsne31RmqKU9T6L2DaRHKq\n7o8FU8D5mNlJJKUzKx8c23rb1qL5EKAbk0pbAJ02pxjcW3aDDrZcSamHOjal\n3TzI\r\n=zcws\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxtQBFuNGbZXb6FLAKG/ObY2grn+dySswS6Rcq4ewASgIgGvlZRi4u6uKg+jsz4DL1p+VzZx6IyS06q9ybijT9NQk="}]},"_npmUser":{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"},"directories":{},"maintainers":[{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/add-logging_0.1.0_1616948846151_0.19425016424803698"},"_hasShrinkwrap":false},"1.0.0":{"name":"@alu0100987522/add-logging","version":"1.0.0","description":"Add a console.log after entering a function.","author":{"name":"Aitor Hernández Sánchez","email":"alu0100987522@ull.edu.es","url":"https://github.com/alu0100987522"},"main":"./src/add-logging.js","bin":{"add-logging":"bin/exec-addlogging.js"},"jest":{"verbose":true,"collectCoverage":true},"scripts":{"doc":"npx documentation build src/** -f html -o docs","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522.git"},"licenses":[{"type":"MIT","url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/blob/master/LICENSE"}],"bugs":{"url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/issues"},"homepage":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522#readme","dependencies":{"commander":"^7.1.0","escodegen":"^2.0.0","espree":"^7.3.1","estraverse":"^5.2.0"},"devDependencies":{"documentation":"^13.2.0","jest":"^26.6.3"},"gitHead":"c1dddae9f0152ba73b7c5913acb4a5f0d6345a20","_id":"@alu0100987522/add-logging@1.0.0","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-VA6BzeAyo4F/cIO2YjDwRLu2CQUc/57kYoqonLIGZWPDWpe36X1lAqTCXAl0lefF/waH970O8oYwhW/3knE3ag==","shasum":"c0f5d3887f3650f1e689c86efeb25bd83aa769d7","tarball":"https://registry.npmjs.org/@alu0100987522/add-logging/-/add-logging-1.0.0.tgz","fileCount":32,"unpackedSize":1578166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY07yCRA9TVsSAnZWagAAIzMP/jymd9ukWvUXBOwjbLBe\ngyn6pHv+1tXxqtbWqsf/qWPds8ti6jqNm5oNoV9bYbEDdFIpEtLRw6MhFNMT\nII+XoQJsr4Dye/COxr/9gSstSfaECWMV5pcPyHum2vIaf7i6VDxA1FeN4OfM\n4ZpjUoYS2mn5Owtpi5H3KjKGdxbkTxatsdapkoISBlthLrN+hwsH8bpncOkL\nmA9knUBgNIDMc3/HXvmIctH50hos5DXtQNGeRsFhZpJ8rhEiqiI8OR04pwUA\n8inTq1p0+rjS5nfzHTf6+Qvk2SxNHZ2OcxhWqVKGOcOsn55VX9QdIiIvFtWF\n4WvCWlx+EviUxK8N2tCQpM32ErlcCgcC2Ai8vYwAhbr0ctnM5M4GDUUhvVJV\nBmAjcoLLwOYg587HLMzz5xEXxfJyq6YjEnmqxzg7zjZhKFe5B29Gl6R4Kxh+\nuWfjjcVl/nKEfgrEEI4B0v7fE1q8TEvTEjSAzBNtHlowo9PoHQqbSaO2NNJL\n1RbEBP7sxHG1qcX2r2sb7YnDyeVrUcmY4gGMp9+fFZxBABFruP/d+BTK33t1\ngis7b53C9w5uZWKof2+AEWg1zxtB0FMgKbMxy2fjhPH+qMx4zY5SBmnww/ce\nmPPv8BWdfMrgfDRW/vpus20wRNcVJxFI9oXl3fcSbMpy0bR3IHpHnKZTYhnR\nVUFX\r\n=2mHw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGFjNLYHxmvkxy3s0alss+79bsOI/BMzsfqtBoeI0XKAiEAoFEmM5vF5Kk0+YL67Eelku3luWO3XUbO58BFF5orWuU="}]},"_npmUser":{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"},"directories":{},"maintainers":[{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/add-logging_1.0.0_1617121010232_0.808330293879044"},"_hasShrinkwrap":false},"1.0.1":{"name":"@alu0100987522/add-logging","version":"1.0.1","description":"Add a console.log after entering a function.","author":{"name":"Aitor Hernández Sánchez","email":"alu0100987522@ull.edu.es","url":"https://github.com/alu0100987522"},"main":"./src/add-logging.js","bin":{"add-logging":"bin/exec-addlogging.js"},"jest":{"verbose":true,"collectCoverage":true},"scripts":{"doc":"npx documentation build src/** -f html -o docs","test":"jest","production:test":"cd ../test-repo && npm test"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522.git"},"licenses":[{"type":"MIT","url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/blob/master/LICENSE"}],"bugs":{"url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/issues"},"homepage":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522#readme","dependencies":{"commander":"^7.1.0","escodegen":"^2.0.0","espree":"^7.3.1","estraverse":"^5.2.0"},"devDependencies":{"documentation":"^13.2.0","jest":"^26.6.3"},"gitHead":"d1244e6cd75f8032b4bcf88e42b226c5d0ca0f0f","_id":"@alu0100987522/add-logging@1.0.1","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-A6ASDXOUq8nLZYYiOiNmxnqpLsaoNIMNHFHi03QvCix7tDW6K6UaSH0M+Y5GCpI+kWQhd/Lle2jfT3SLc4L18w==","shasum":"c3dc3c742da37526991a9a3c1a30ea79743fa8ad","tarball":"https://registry.npmjs.org/@alu0100987522/add-logging/-/add-logging-1.0.1.tgz","fileCount":32,"unpackedSize":1578220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY4ygCRA9TVsSAnZWagAADl0P/2Uy+/LRd3aasaygzGYb\nlxg2ohZM9ME1emWbQ6Rton8/uCqFU+kuKzY8EjLImKCY3sjbE44+9SaG1fT5\n7GDNDmmgSvS6neM3jerv3efj1dAH3YCkA17UHchvroREmACaBsItnTy+oAUl\nxpqLIJBbubReQHXSJcVHjEOzX8fkzsLXUT/nuQVRuakMG1hEXUYGMBWMXIJM\nrIv5uwcfVUFBK8A+OQ/IoyfBeGlZnaypXlYxS4taKPBxrll2gZ52euB+NI60\nMjKdTeES+wEysJS2TKQEl6nr+zjQNCSUapsknPIwmR4CqqKYJvjhp+gcD0EI\nbBpt3Sa2XK/m6d5T1P/4aZlAZ9aix53foiYvxBKdG+yW0UBtCyOBCtxZbGNN\nP2Q6ighwoQWLWhpZ7xwGpIIXCQTOQV0vbl7JqoynBGtrYeL+vBdvJD3T00/+\n589mqpxIr5oQawxqB53YDXelhaOsRFnj/hmsIEWBsbrUIt51dAQ+QJM19xZm\nvhj4F0nnUd3guZX7iuSa8SRZEGrdMeOfJQOp5n3E5tJzFoEWSjEFPzZEvNXA\nKGSDuBS4zE+wG9hXzYo57xCVKSvsUUVeyY948nyu0Wmg2AjHVdpHGCBDUXZk\n0/KlNtfNBJ5ROcs9rQwgdDkkSrfn2y2w3NBClU/VzMf9DqfItNQ58BOi4HoB\nmmyH\r\n=diOB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZTZkgFCzcY3N/gmQgVJbJfCGvdlrJml43tkgcSThAFAiAP65m9WigQ+k3c/6zrGS7Or7THq2Acr9SENbaNsaV0sA=="}]},"_npmUser":{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"},"directories":{},"maintainers":[{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/add-logging_1.0.1_1617136799581_0.41625355260277686"},"_hasShrinkwrap":false},"1.0.2":{"name":"@alu0100987522/add-logging","version":"1.0.2","description":"Add a console.log after entering a function.","author":{"name":"Aitor Hernández Sánchez","email":"alu0100987522@ull.edu.es","url":"https://github.com/alu0100987522"},"main":"./src/add-logging.js","bin":{"add-logging":"bin/exec-addlogging.js"},"jest":{"verbose":true},"scripts":{"doc":"npx documentation build src/** -f html -o docs","test":"jest","coverage":"jest --coverage","production:test":"cd ../test-repo && npm test"},"repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522.git"},"licenses":[{"type":"MIT","url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/blob/master/LICENSE"}],"bugs":{"url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/issues"},"homepage":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522#readme","dependencies":{"commander":"^7.1.0","escodegen":"^2.0.0","espree":"^7.3.1","estraverse":"^5.2.0"},"devDependencies":{"documentation":"^13.2.0","jest":"^26.6.3"},"gitHead":"b12b15c40789c2ccf512aa1938fd5c9df9c8c1ba","_id":"@alu0100987522/add-logging@1.0.2","_nodeVersion":"15.9.0","_npmVersion":"7.5.3","dist":{"integrity":"sha512-8QVgqM81/nsF4GHF6PSSMPrn5DsnPZn1RnQuvA0NVoKZFv3MBCZxNEnsP87dG/bIgUVamrPtF+u9CFHKrODglQ==","shasum":"792c58b49c51cf766ce6e49753120175fb2c23ee","tarball":"https://registry.npmjs.org/@alu0100987522/add-logging/-/add-logging-1.0.2.tgz","fileCount":32,"unpackedSize":1578226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZFVECRA9TVsSAnZWagAAmo4QAIclZnbxXbV42kCP+2JX\n01Q27t1lM1pANT4o5KDfswntE/nreCUkyqFAybbuy1unb1iuLgyVbvBGn49W\nVLafSetl2bNOUcg9zlS9Sux182ih0EmlKWtHxZZjCgeCQeXNo7KzH91ov+ab\nJqcZtjovF3hO+6hP3suuhM1NgwXgckxGkWrjH13R06egrGd1/nRNLBeKUAwx\nAdISzobnmzeuspqTNwijz3e5yV03dKezjz0lwtpq4vLsx9LMGhJivjqNfCER\nYwx5PpZR7DBicACgPMY3p1u3NnavrFR65DTJAhJaSJqjrO5X82y5m1qfyrmd\noVvmxwvK8Etuu6hGM9qmA4PshSEuYxz99f/cn4hQSXXdVIftY+0Rr9zLMv7J\nHVwsdcx8KAH6wkdsZ9RUgrpeY5ndnlTgs4rKRfS7n/bLiZYK4VMnXlRVtNd5\n/0IWQ1BGuwSxVuJzzrzDw0gDLZQtTB6tgHaKm4nLFMN+q75cV/ZFVnt39QSD\ni1NGUIixfCpuVooihLTCZ9veXNj2uEDuE+2nm8ZkJGmpb8kyAB8WQKrmTo5X\nVAWzMmekd2Lbo1Z/F/YcVLYc6wLti57GUQRTJAu6H+kNjUnmJjuBQTJ/idWY\n8+pwfUvac9oY9wJC12ObrosaPVi/tUwh5U+Cb7Swh0i0CdU6uI1L403SrnSJ\nh8O7\r\n=r58d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDauhAMJF4OWfdCwxK4E4c7NSwsMbWto5Ey/97EVLVXoAIgDxsPHzv0+dsRTq0MZy/ilDZ0CFFzb7L3K66R29l4pfo="}]},"_npmUser":{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"},"directories":{},"maintainers":[{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/add-logging_1.0.2_1617188163578_0.18193902067350498"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-28T16:27:26.082Z","0.1.0":"2021-03-28T16:27:26.315Z","modified":"2022-04-04T13:40:57.040Z","1.0.0":"2021-03-30T16:16:50.525Z","1.0.1":"2021-03-30T20:39:59.828Z","1.0.2":"2021-03-31T10:56:03.759Z"},"maintainers":[{"name":"alu0100987522","email":"alu0100987522@ull.edu.es"}],"description":"Add a console.log after entering a function.","homepage":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522#readme","repository":{"type":"git","url":"git+https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522.git"},"author":{"name":"Aitor Hernández Sánchez","email":"alu0100987522@ull.edu.es","url":"https://github.com/alu0100987522"},"bugs":{"url":"https://github.com/ULL-ESIT-PL-2021/espree-logging-module-alu0100987522/issues"},"readme":"# AddLogging <!-- no toc -->\n\nThis library will add logs after entering a function.\n\n- [API Documentation](https://ull-esit-pl-2021.github.io/espree-logging-module-alu0100987522/)\n\n___\n- [AddLogging](#addlogging)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Commands](#commands)\n    - [Import to use](#import-to-use)\n    - [Method](#method)\n  - [Example](#example)\n  - [License](#license)\n___\n\n## Installation\n\n**Install locally in project**\n\n```console\n~ npm i -D @alu0100987522/add-logging\n```\n\n**Install globally**\n\n```console\n~ npm i -g @alu0100987522/add-logging\n```\n___\n\n## Usage\n\n### Commands\n\n- **add-logging**\n\n  Use this command as a executable for the addLogging module.\n\n  ```console\n  ~ add-logging\n  ```\n\n  ```console\n  Usage: add-logging [options] <input_filename>\n\n  Add a console.log after entering a function.\n\n  Options:\n    -V, --version                  output the version number\n    -o, --output <filename>        stablish an output file to save the final code\n    -p, --pattern <stringPattern>  stablish a string pattern to match with names of declared-type functions\n    -h, --help                     display help for command\n  ```\n<br>\n\n- **add-logging -h --help**\n\n  Show the version of the library\n\n  ```console\n  ~ add-logging -h\n  ```\n  ```console\n    Usage: add-logging [options] <input_filename>\n\n    Add a console.log after entering a function.\n\n    Options:\n      -V, --version                  output the version number\n      -o, --output <filename>        stablish an output file to save the final code\n      -p, --pattern <stringPattern>  stablish a string pattern to match with names of declared-type functions\n      -h, --help                     display help for command\n  ```\n\n<br>\n\n- **add-logging -V --version**\n\n  Show the version of the library.\n\n  ```console\n  ~ add-logging -V\n    0.1.0\n  ```\n  \n  ```console\n  ~ add-logging --version\n    0.1.0 \n  ```\n\n<br>\n\n- **add-logging -o --output**\n\n  Add a log after entering a function, and write the result in a file.\n\n  ```console\n  ~ add-logging -o output.js input.js \n\n    input: function suma(a, b) {\n      return a + b;\n    }\n\n    Salida en fichero output.js\n  ```\n\n<br>\n\n- **add-logging -p --pattern**\n\n  Add a log after enterinf a function but only if the --pattern introduced matches with the name of \n  the function.\n\n  ```console\n  ~ add-logging --pattern suma input-log.js input.js\n\n    input: function suma(a, b) {\n      return a + b;\n    }\n\n    Salida en fichero input-log.js\n  ```\n\n<br>\n\n### Import to use\n\n```js\nconst { addLogging } = require('@alu0100987522/add-logging');\n```\n\n### Method\n\nThis method add new line of log before your code in functions and return a new string.\n\nIt receives 2 parameters:\n\n  - **Code: {string}**  code to read and find functions to write the new line\n  - **Pattern: {string}** word you want to choose, and find only functions match with that word.  \n\n```js\nconst output = addLogging(input, 'suma')\n```\n\nThe variable output contain the string with the code with a new line of log.\n\n## Example\n\n**Code**\n\n```js\nconst { addLogging } = require('@alu0100987522/add-logging');\n\nconst sum = `function suma(a, b) {\n  return a + b;\n}`\n\nconst output = addLogging(sum, 'suma')\n\nconsole.log(output)\n```\n\n**Output**\n\n```console\n ~ node src/add.js \n\n  function suma(a, b) {\n      console.log(`Entering suma(${ a },${ b }) at line 1`);\n      return a + b;\n  }\n```\n\n___\n\n## License\n\n[MIT](./LICENSE)","readmeFilename":"README.md"}