Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jul 13, 2024 via pnpm

depd 2.0.0

Deprecate all the things
Package summary
Share
0
issues
1
license
1
MIT
Package created
15 Jun 2014
Version published
26 Oct 2018
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
depd@2.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of depd 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does depd do?

Depd, also known as "deprecate all the things", is a library in Node.js to assist in marking modules or parts of a codebase as deprecated. It helps in alerting application users or developers of deprecated functionalities in a codebase in a granular and informative manner. The deprecation warnings from this module also include the file and line information for the call into the module where the deprecated function was invoked.

How do you use depd?

To utilize depd in your application, you firstly need to install it using npm. Running npm install depd in the terminal will install the depd library. After installation, you can require it in your JavaScript files. Create a new deprecate function that uses a unique namespace name in the messages. It is advised to use the name of your module as the namespace. The usage might look as follows:

const deprecate = require('depd')('my-module');

Depd can be used in a number of ways such as deprecating function calls, access to object properties, and more. For example, to deprecate a function call with depd:

const deprecate = require('depd')('my-module');

exports.myFunction = deprecate.function(() => {
  // function logic here..
}, 'myFunction is deprecated');

In the example above, all calls to myFunction will display the 'myFunction is deprecated' message. Keep in mind that each file should create its new deprecate object.

Where are the depd docs?

The depd documentation can be found directly in the readme file on the GitHub repository. The readme file comprehensively goes through various ways to leverage depd such as creating a deprecation object, deprecating function calls, deprecating property access, controlling deprecation messages and capturing deprecation errors among other functionalities.