npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@alu0101265704/addlogging

v1.1.3

Published

[![npm version](https://badge.fury.io/js/%40alu0101265704%2Faddlogging.svg)](https://badge.fury.io/js/%40alu0101265704%2Faddlogging)

Downloads

11

Readme

npm version

Addlogging

Module that provides an addlogging method, which from a given JavaScript function,adds logging messages before the entire code declaration begins.

Installation

Install globally

npm install -g @alu0101265704/addlogging

Install locally

npm install @alu0101265704/addlogging

Usage

Importing it to the project

For the module to be used, you will only need it to be imported into your development project, like for example:

const test = require('@alu0101265704/addlogging');
...
const result = test.addLogging(inputCode, patternName);
...

Execution options

IMPORTANT: If you want to execute directly from your command line, you must have installed this package as globally in your system, in that case you be able to execute add-logging with differents arguments as follows:

  • add-logging -h, --help

Using the option help, will show how many options you will be able to use with the executable and how it works.

add-logging -h

Usage: add-logging add-logging [options]

Options:
  -V, --version                                            output the version number
  -o, --output <output_file>                               output file of the program
  -p, --pattern <pattern_name> <output_file> <input_file>  function pattern name and output file of the program
  -h, --help                                               display help for command
  • add-logging -V, --version

Using the option version, will show the version of the module.

add-logging --version

1.1.2
  • add-logging -p, --pattern

Using the option pattern followed by a pattern name (string), output file path and input file path, the program will be executed but only by adding lines in those functions which are the same as the pattern name, and finally write those results in the output file.

add-logging -p 'multiply' output/output.js input/input1.js 

Output in file 'output/output.js
  • add-logging -o, --output

Using the option output followed by the output file path and the input file path, the program will be executed as usual, that is to say, will add a log message into the function and write the result in the output file.

add-logging --output output/output.js input/input1.js 

Output in file 'output/output.js'

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.