JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 73
  • Score
    100M100P100Q58761F
  • License ISC

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cl-print) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    cl-print

    cl-print is an npm package that extends the default console.log functionality to include the filename and line number where the log was triggered. This makes debugging easier by showing exactly where in your code the log statement originated.


    Features

    • Automatically displays the filename and line number for each console output.
    • Works as a drop-in replacement for console.log.
    • Makes debugging easier by providing context for logs.

    Installation

    Install the package using npm:

    npm install cl-print

    Usage

    Simply require or import the package and use it like console.log.

    Example

    const clPrint = require('cl-print');
    
    clPrint('Hello, World!'); 
    // Output: [xyz.js:15] Hello, World!

    Sample Output

    If you add the following code in a file named example.js:

    const clPrint = require('cl-print');
    
    function test() {
      clPrint('This is a test log.');
    }
    
    test();

    You’ll see the following output in the console:

    [example.js:4] This is a test log.

    Why Use cl-print?

    • Debugging Made Easy: Quickly find where logs are being triggered.
    • No Manual Effort: No need to manually include filenames and line numbers in your logs.
    • Improves Productivity: Spend less time searching through your code.

    Contributing

    Contributions are welcome! Please fork the repository, make your changes, and submit a pull request.


    License

    This project is licensed under the MIT License. See the LICENSE file for details.


    Author

    Developed by Krishna Kumar. Feel free to reach out with feedback or suggestions!