Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtorre4580 committed Dec 17, 2023
1 parent 57c63ae commit 7478269
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ npm i deprecated

Function to notify about deprecation and wrap the function/method with deprecation warnings.

<img alt="example usage" src="https://github.com/mtorre4580/deprecated/blob/main/example_usage.png?raw=true" />

### With Function

```js
import deprecated from "deprecated";
import deprecated from "@mtorre4580/is-deprecated";

// Function to add the deprecated helper
const myFunction = (arg1, arg2) => {};
Expand All @@ -48,14 +50,14 @@ deprecatedMyFunction('', {});
### With Function in Object

```js
import deprecated from "deprecated";
import deprecated from "@mtorre4580/is-deprecated";

// Object to apply the deprecated method
const API = {
timeout: 5000,
getUsers() {
return new Promise((resolve, reject) => {
setTimeOut(() => {
return new Promise((resolve) => {
setTimeout(() => {
resolve([
{ id: 2, name: "Matias" },
{ id: 3, name: "Belen" },
Expand Down
Binary file added example_usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@
"url": "https://github.com/mtorre4580/deprecated/issues"
},
"keywords": [
"deprecated",
"deprecated",
"javascript",
"nodejs"
"nodejs",
"functions",
"methods",
"utility"
],
"author": "mtorre4580",
"files":["dist"],
"main":"./dist/deprecated.umd.js",
"module":"./dist/deprecated.es.js",
"files": [
"dist"
],
"main": "./dist/deprecated.umd.js",
"module": "./dist/deprecated.es.js",
"exports": {
".": {
"import": "./dist/deprecated.es.js",
Expand Down

0 comments on commit 7478269

Please sign in to comment.