- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Node.js – process.noDeprecation() Method
This process.noDeprecation() method states whether the --no- Deprecation flag is set or not on the current Node.js project. This Boolean flag controls whether the deprecation warning messages are printed to stderr or not. Setting this flag as True will silence all the deprecation warnings.
Syntax
process.noDeprecation( )
Example 1
Create a file with the name "noDeprecation.js" and copy the following code. After creating the file, use the command "node noDeprecation.js" to run this code as shown in the example below
// process.noDeprecation() Demo Example // Importing the process module const process = require('process'); // Printing noDeprecation default value console.log(process.noDeprecation);
Output 1
undefined
Output 2
true
Example 2
Let's take another example −
// process.noDeprecation() Demo Example // Importing the process module const process = require('process'); // Initializing the noDeprecation flag process.noDeprecation = false; // Printing noDeprecation console.log(process.noDeprecation); // Initializing the noDeprecation flag process.noDeprecation = true; // Printing noDeprecation console.log(process.noDeprecation);
Output 1
false true
Output 2
true true
Advertisements
To Continue Learning Please Login
Login with Google