Skip to content

Commit 629a63a

Browse files
committed
Update README.md
1 parent 951dc44 commit 629a63a

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

README.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3531,41 +3531,6 @@ assert(50 > 70, "50 is less than 70.");
35313531
<b><a href="#table-of-contents">↥ back to top</a></b>
35323532
</div>
35333533

3534-
## Q. When should you npm and when yarn?
3535-
3536-
* **npm**
3537-
3538-
It is the default method for managing packages in the Node.js runtime environment. It relies upon a command line client and a database made up of public and premium packages known as the the npm registry. Users can access the registry via the client and browse the many packages available through the npm website. Both npm and its registry are managed by npm, Inc.
3539-
3540-
```js
3541-
node -v
3542-
npm -v
3543-
```
3544-
3545-
* **Yarn**
3546-
3547-
Yarn was developed by Facebook in attempt to resolve some of npm\'s shortcomings. Yarn isn\'t technically a replacement for npm since it relies on modules from the npm registry. Think of Yarn as a new installer that still relies upon the same npm structure. The registry itself hasn\'t changed, but the installation method is different. Since Yarn gives you access to the same packages as npm, moving from npm to Yarn doesn\'t require you to make any changes to your workflow.
3548-
3549-
```js
3550-
npm install yarn --global
3551-
```
3552-
3553-
**Comparing Yarn vs npm**
3554-
3555-
* Fast: Yarn caches every package it downloads so it never needs to again. It also parallelizes operations to maximize resource utilization so install times are faster than ever.
3556-
* Reliable: Using a detailed, but concise, lockfile format, and a deterministic algorithm for installs, Yarn is able to guarantee that an install that worked on one system will work exactly the same way on any other system.
3557-
* Secure: Yarn uses checksums to verify the integrity of every installed package before its code is executed.
3558-
* Offline Mode: If you've installed a package before, you can install it again without any internet connection.
3559-
* Deterministic: The same dependencies will be installed the same exact way across every machine regardless of install order.
3560-
* Network Performance: Yarn efficiently queues up requests and avoids request waterfalls in order to maximize network utilization.
3561-
* Multiple Registries: Install any package from either npm or Bower and keep your package workflow the same.
3562-
* Network Resilience: A single request failing won't cause an install to fail. Requests are retried upon failure.
3563-
* Flat Mode: Resolve mismatching versions of dependencies to a single version to avoid creating duplicates.
3564-
3565-
<div align="right">
3566-
<b><a href="#table-of-contents">↥ back to top</a></b>
3567-
</div>
3568-
35693534
## Q. What is the use of DNS module in Node.js?
35703535

35713536
DNS is a node module used to do name resolution facility which is provided by the operating system as well as used to do an actual DNS lookup. No need for memorising IP addresses – DNS servers provide a nifty solution of converting domain or subdomain names to IP addresses. This module provides an asynchronous network wrapper and can be imported using the following syntax.

0 commit comments

Comments
 (0)