Welcome to my blog !

Best ways to get package.json version in NodeJS with examples

April 27, 2023 ·  1 min read

This tutorial shows multiple ways to get a package.json version of a nodejs application. There are multiple ways we can read the package.json file in Nodejs Application. First Way, using require and import, Second-way using the fs module read json file. You can also check other posts on npm command deprecate option is deprecated Nodejs Get the Version of the package.json application using require and import if you are using the ES5 javascript version, use the required keyword...

2 ways to Convert XML to JSON in Nodejs | Javascript example

April 27, 2023 ·  4 min read

This tutorial explains how to convert XML to JSON In javascript and Nodejs Applications. XML is an extensible markup language that contains properties or tags in the parent tag relation. JSON is a simple format to have a key and values pair enclosed in parenthesis{}`. Both are used to store different types of data, there is no manual conversion from one type to another in nodejs and javascript You can check more about xml and json types This post talks about How to convert XML to JSON in NodeJS...

How to Convert word document to pdf in Nodejs| Javascript example

April 27, 2023 ·  4 min read

In this post, You will learn how to convert Docx files to pdf documents in JavaScript and nodejs. Docx/doc are document file formats from Microsoft, that contains images, text, tables, and styles PDF files are from Adobe company, which is a separate format for representing the content of images, texts, and styles There are a lot of online tools to do the conversion from doc to pdf. Sometimes, As a programmer, you need to have a conversion of different formats in the JavaScript/NodeJS applications....

Jest cache - Disable, Find Cache Directory with examples

April 26, 2023 ·  2 min read

This tutorial explains about below things jest cache allows you to run the test cases faster to improve the execution time. Jest provides multiple options to run in any javascript projects jest command line. How to disable cache in jest test cases the jest command line provides two options to enable or disable the cache --cache: Enable the cache, It is a default option. --no-cache: Disable the cache jest --cache jest by default store its in a temporary cache for performance improvement...

2 ways to print Jest console debug logs with examples

April 26, 2023 ·  2 min read

Sometimes, it is very difficult to debug test case execution for fixing failed test cases in JEST. I faced console.log not working for printing debug logs. console.log outputs nothing during test case execution Jest prints log using console.log statements There are two options to enable logging using –silent Jest by default suppresses the console log statements. It shows nothing instead of printing a log message. JEST provides CLI option --silent=false to enable print log messages....

You'll get a notification every time a post gets published here.