dphelper 0.2.21 → 0.2.25

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/.jshintrc CHANGED
@@ -1,13 +1,13 @@
1
- {
2
- "esversion": 9,
3
- "asi": false,
4
- "esnext": false,
5
- "moz": true,
6
- "boss": true,
7
- "node": true,
8
- "validthis": true,
9
- "globals": {
10
- "EventEmitter": true,
11
- "Promise": true
12
- }
13
- }
1
+ {
2
+ "esversion": 11,
3
+ "asi": false,
4
+ "esnext": false,
5
+ "moz": true,
6
+ "boss": true,
7
+ "node": true,
8
+ "validthis": true,
9
+ "globals": {
10
+ "EventEmitter": true,
11
+ "Promise": true
12
+ }
13
+ }
package/README.md CHANGED
@@ -1,27 +1,37 @@
1
1
  # dpHelper
2
2
 
3
- Many utils for your projects
3
+ Many tools for your projects
4
4
 
5
- Use "npm i dphelper" to install
5
+ ## about
6
6
 
7
- in the index:
7
+ You have a lot of tools for you that make your life easier and faster!
8
+
9
+ ## install
10
+
11
+ ```js
12
+ npm install dphelper
13
+ ```
14
+
15
+ in the index (and only there):
8
16
 
9
17
  ```js
10
18
  import "dphelper"
11
19
  ```
12
20
 
13
- type 'dphelper' in your console to have a look about all available functions that you can use globaly!
21
+ ## check
22
+
23
+ type 'dphelper' in your console to have a look about all available tools that you can use globaly!
14
24
 
15
- You can call these from everywhere without import
25
+ You can call these from everywhere without import (just one at index)
16
26
 
17
- ## CURRENCY
27
+ ## LIST
28
+
29
+ ### CURRENCY
18
30
 
19
31
  ```js
20
32
  dphelper.currency( val, int = 'en-US', cur = 'USD' )
21
33
  ```
22
34
 
23
- ## OPTIONS
24
-
25
35
  ### MEMORY / STORAGE
26
36
 
27
37
  ```js
package/init.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  /***********************************************************************/
9
9
 
10
- (function () {
10
+ ( () => {
11
11
 
12
12
  if (typeof window === 'undefined') {
13
13
  global.window = {};
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "dphelper",
3
- "version": "0.2.21",
3
+ "version": "0.2.25",
4
4
  "description": "Many utils for your projects",
5
5
  "main": "index.js",
6
6
  "publishConfig": {},
7
-
8
7
  "scripts": {
9
8
  "test1": "echo \"Error: no test specified\" && exit 1",
10
9
  "test": "jest --silent --detectOpenHandles",
11
10
  "test-coverage": "jest --coverage --silent"
12
11
  },
13
-
14
12
  "targets": {
15
13
  "main": {
16
14
  "includeNodeModules": {
@@ -21,29 +19,23 @@
21
19
  }
22
20
  },
23
21
  "deprecated": false,
24
-
25
22
  "engines": {
26
23
  "node": ">=0.10.0"
27
24
  },
28
-
29
25
  "repository": {
30
26
  "type": "git",
31
27
  "url": "https://github.com/passariello/dpHelper",
32
28
  "help": "https://github.com/passariello/dpHelper#readme"
33
29
  },
34
-
35
30
  "eslintConfig": {
36
31
  "globals": {
37
32
  "window": true
38
33
  }
39
34
  },
40
-
41
35
  "bugs": {
42
36
  "url": "https://github.com/passariello/dpHelper/issues"
43
37
  },
44
-
45
38
  "homepage": "https://github.com/passariello/dpHelper",
46
-
47
39
  "keywords": [
48
40
  "utils",
49
41
  "tools",
@@ -56,21 +48,18 @@
56
48
  "powerful",
57
49
  "passariello"
58
50
  ],
59
-
60
51
  "author": {
61
52
  "name": "Dario Passariello",
62
53
  "website": "https://dario.passariello.ca",
63
54
  "email": "dariopassariello@gmail.com"
64
55
  },
65
-
66
56
  "license": "Apache-2.0",
67
-
68
57
  "dependencies": {
69
58
  "jquery": "^3.6.0",
70
59
  "jshint": "^2.13.1",
71
- "require": "^0.4.4"
60
+ "require": "^0.4.4",
61
+ "uglify-js": "^3.14.5"
72
62
  },
73
-
74
63
  "contributors": [
75
64
  {
76
65
  "name": "Dario Passariello",
@@ -81,5 +70,4 @@
81
70
  "email": "valeriacalascaglitta@gmail.com"
82
71
  }
83
72
  ]
84
-
85
73
  }
@@ -15,14 +15,17 @@ window.dphelper.storage = {
15
15
  if(!name) return;
16
16
  return window.localStorage.getItem( name );
17
17
  },
18
+
18
19
  set: function( name, value ) {
19
20
  if(!name || !value) return;
20
21
  window.localStorage.setItem( name, JSON.stringify(value) );
21
22
  },
23
+
22
24
  delete: function( name ) {
23
25
  if(!name) return;
24
26
  window.localStorage.removeItem( name );
25
27
  },
28
+
26
29
  clearAll: function() {
27
30
  window.localStorage.clear();
28
31
  }