@mtorre4580/is-deprecated 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
# deprecated
|
|
1
|
+
# is-deprecated
|
|
2
2
|
|
|
3
3
|
A utility library designed to notify about deprecated functions or methods within objects.
|
|
4
4
|
|
|
5
|
-
<img width="128" height="128" src="https://github.com/mtorre4580/deprecated/blob/main/deprecated.png?raw=true" />
|
|
5
|
+
<img width="128" height="128" src="https://github.com/mtorre4580/is-deprecated/blob/main/deprecated.png?raw=true" />
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
npm i deprecated
|
|
10
|
+
npm i @mtorre4580/is-deprecated
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
@@ -24,10 +24,12 @@ npm i deprecated
|
|
|
24
24
|
|
|
25
25
|
Function to notify about deprecation and wrap the function/method with deprecation warnings.
|
|
26
26
|
|
|
27
|
+
<img alt="example usage" src="https://github.com/mtorre4580/is-deprecated/blob/main/example_usage.png?raw=true" />
|
|
28
|
+
|
|
27
29
|
### With Function
|
|
28
30
|
|
|
29
31
|
```js
|
|
30
|
-
import deprecated from "deprecated";
|
|
32
|
+
import deprecated from "@mtorre4580/is-deprecated";
|
|
31
33
|
|
|
32
34
|
// Function to add the deprecated helper
|
|
33
35
|
const myFunction = (arg1, arg2) => {};
|
|
@@ -48,14 +50,14 @@ deprecatedMyFunction('', {});
|
|
|
48
50
|
### With Function in Object
|
|
49
51
|
|
|
50
52
|
```js
|
|
51
|
-
import deprecated from "deprecated";
|
|
53
|
+
import deprecated from "@mtorre4580/is-deprecated";
|
|
52
54
|
|
|
53
55
|
// Object to apply the deprecated method
|
|
54
56
|
const API = {
|
|
55
57
|
timeout: 5000,
|
|
56
58
|
getUsers() {
|
|
57
|
-
return new Promise((resolve
|
|
58
|
-
|
|
59
|
+
return new Promise((resolve) => {
|
|
60
|
+
setTimeout(() => {
|
|
59
61
|
resolve([
|
|
60
62
|
{ id: 2, name: "Matias" },
|
|
61
63
|
{ id: 3, name: "Belen" },
|
package/package.json
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtorre4580/is-deprecated",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Library to deprecated properties and methods in objects or functions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/mtorre4580/deprecated"
|
|
8
|
+
"url": "https://github.com/mtorre4580/is-deprecated"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://github.com/mtorre4580/deprecated/blob/main/README.md",
|
|
10
|
+
"homepage": "https://github.com/mtorre4580/is-deprecated/blob/main/README.md",
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/mtorre4580/deprecated/issues"
|
|
12
|
+
"url": "https://github.com/mtorre4580/is-deprecated/issues"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
|
-
"deprecated",
|
|
16
15
|
"deprecated",
|
|
17
16
|
"javascript",
|
|
18
|
-
"nodejs"
|
|
17
|
+
"nodejs",
|
|
18
|
+
"functions",
|
|
19
|
+
"methods",
|
|
20
|
+
"utility"
|
|
19
21
|
],
|
|
20
22
|
"author": "mtorre4580",
|
|
21
|
-
"files":[
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"main": "./dist/is-deprecated.umd.js",
|
|
27
|
+
"module": "./dist/is-deprecated.es.js",
|
|
24
28
|
"exports": {
|
|
25
29
|
".": {
|
|
26
|
-
"import": "./dist/deprecated.es.js",
|
|
27
|
-
"require": "./dist/deprecated.umd.js"
|
|
30
|
+
"import": "./dist/is-deprecated.es.js",
|
|
31
|
+
"require": "./dist/is-deprecated.umd.js"
|
|
28
32
|
}
|
|
29
33
|
},
|
|
30
34
|
"scripts": {
|
|
File without changes
|
|
File without changes
|