dphelper 0.2.27 → 0.2.31

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.
Files changed (85) hide show
  1. package/data/list.json +19 -26
  2. package/init.js +20 -5
  3. package/package.json +6 -11
  4. package/scripts/{date2Iso.js → .OLD/~date2Iso.js} +31 -20
  5. package/scripts/{date2MMDDYYYY.js → .OLD/~date2MMDDYYYY.js} +27 -16
  6. package/scripts/{dateConvert.js → .OLD/~dateConvert.js} +31 -20
  7. package/scripts/{dateIso2Epoch.js → .OLD/~dateIso2Epoch.js} +28 -17
  8. package/scripts/{dateLocal-ISOTime.js → .OLD/~dateLocal-ISOTime.js} +28 -17
  9. package/scripts/.OLD/~dateUTC.js +25 -0
  10. package/scripts/{disableSpellCheck.js → .OLD/~disableSpellCheck.js} +32 -21
  11. package/scripts/.OLD/~loadJson.js +27 -0
  12. package/scripts/{loadJsonExternal.js → .OLD/~loadJsonExternal.js} +44 -32
  13. package/scripts/{object2array.js → .OLD/~object2array.js} +15 -3
  14. package/scripts/.OLD/~parseDate.js +30 -0
  15. package/scripts/.OLD/~pathHash.js +27 -0
  16. package/scripts/.OLD/~pathQuery.js +28 -0
  17. package/scripts/.OLD/~pathRail.js +27 -0
  18. package/scripts/{scrollIndicator.js → .OLD/~scrollIndicator.js} +0 -0
  19. package/scripts/{scrollMemory.js → .OLD/~scrollMemory.js} +0 -0
  20. package/scripts/{scrollSmooth.js → .OLD/~scrollSmooth.js} +0 -0
  21. package/scripts/{scrollToElement.js → .OLD/~scrollToElement.js} +0 -0
  22. package/scripts/{svgSupport.js → .OLD/~svgSupport.js} +0 -0
  23. package/scripts/addListenerMulti.js +22 -0
  24. package/scripts/anchorToOnClick.js +15 -3
  25. package/scripts/array.js +29 -3
  26. package/scripts/camelCase.js +41 -0
  27. package/scripts/console.js +86 -0
  28. package/scripts/cookie.js +97 -71
  29. package/scripts/currency.js +31 -11
  30. package/scripts/date.js +101 -0
  31. package/scripts/disable.js +88 -0
  32. package/scripts/font.js +52 -0
  33. package/scripts/form.js +113 -0
  34. package/scripts/indexedDB.js +47 -10
  35. package/scripts/isPromise.js +26 -14
  36. package/scripts/json.js +42 -0
  37. package/scripts/load.js +70 -0
  38. package/scripts/nl2br.js +26 -14
  39. package/scripts/noCache.js +26 -14
  40. package/scripts/obj.js +81 -0
  41. package/scripts/onBeforeUnLoad.js +120 -108
  42. package/scripts/parseBool.js +27 -15
  43. package/scripts/path.js +94 -0
  44. package/scripts/printInfo.js +28 -16
  45. package/scripts/purge.js +53 -41
  46. package/scripts/pushState.js +33 -14
  47. package/scripts/randomNum.js +15 -3
  48. package/scripts/randomNumTmr.js +26 -14
  49. package/scripts/screen.js +64 -0
  50. package/scripts/scrollbar.js +226 -0
  51. package/scripts/{handleEvent.js → shortcut.js} +70 -59
  52. package/scripts/sleep.js +26 -14
  53. package/scripts/storage.js +29 -3
  54. package/scripts/svg.js +372 -0
  55. package/scripts/text.js +49 -0
  56. package/scripts/time.js +41 -0
  57. package/scripts/trigger.js +37 -0
  58. package/scripts/uuid.js +33 -14
  59. package/scripts/window.js +50 -38
  60. package/#cmd.exe.lnk +0 -0
  61. package/.github/workflows/codeql-analysis.yml +0 -70
  62. package/README.md.bak +0 -70
  63. package/scripts/.OLD/arrayDeleteItem.js +0 -35
  64. package/scripts/.OLD/arrayItemFinder.js +0 -22
  65. package/scripts/.OLD/arrayMerge.js +0 -20
  66. package/scripts/.OLD/arrayUnique.js +0 -15
  67. package/scripts/.OLD/loadAsset.js +0 -26
  68. package/scripts/dateUTC.js +0 -14
  69. package/scripts/disableSelect.js +0 -46
  70. package/scripts/epoch.js +0 -14
  71. package/scripts/fontFit.js +0 -24
  72. package/scripts/fullScreen.js +0 -40
  73. package/scripts/jsonCounter.js +0 -21
  74. package/scripts/loadFile.js +0 -17
  75. package/scripts/loadJson.js +0 -15
  76. package/scripts/parseDate.js +0 -19
  77. package/scripts/pathHash.js +0 -20
  78. package/scripts/pathQuery.js +0 -24
  79. package/scripts/pathRail.js +0 -26
  80. package/scripts/scrollCustom.js +0 -41
  81. package/scripts/serializeForm.js +0 -94
  82. package/scripts/serializeObj.js +0 -47
  83. package/scripts/stopConsole.js +0 -49
  84. package/scripts/textChanger.js +0 -24
  85. package/scripts/triggerClick.js +0 -16
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * dpHelper <https://github.com/passariello/dpHelper>
3
+ * Copyright (c) 2021, Dario Passariello.
4
+ * Licensed under the Apache-2.0 License.
5
+ */
6
+
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Array From Query",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "pathQuery",
14
+ "subCommand" : [],
15
+ "example" : "",
16
+ "author" : "Dario Passariello",
17
+ "active" : true
18
+ };
19
+
20
+ window.dphelper._list.scripts.push( description );
21
+
22
+ /***********************************************************************/
23
+ // ALIAS
24
+
25
+ window.dphelper.pathQuery = () => {
26
+ console.log( 'Please use "dphelper.path.query()"' );
27
+ return window.dphelper.path.query();
28
+ };
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * dpHelper <https://github.com/passariello/dpHelper>
3
+ * Copyright (c) 2021, Dario Passariello.
4
+ * Licensed under the Apache-2.0 License.
5
+ */
6
+
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Array From Rail",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "pathRail",
14
+ "subCommand" : [],
15
+ "example" : "",
16
+ "author" : "Dario Passariello",
17
+ "active" : true
18
+ };
19
+
20
+ window.dphelper._list.scripts.push( description );
21
+
22
+ /***********************************************************************/
23
+
24
+ window.dphelper.pathRail = () => {
25
+ console.log( 'Please use "dphelper.path.rail()"' );
26
+ return window.dphelper.path.rail();
27
+ };
File without changes
@@ -1,3 +1,25 @@
1
+ /*!
2
+ * dpHelper <https://github.com/passariello/dpHelper>
3
+ * Copyright (c) 2021, Dario Passariello.
4
+ * Licensed under the Apache-2.0 License.
5
+ */
6
+
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Multi Event Listener",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "addListenerMulti",
14
+ "subCommand" : [],
15
+ "example" : "",
16
+ "author" : "Dario Passariello",
17
+ "active" : true
18
+ };
19
+
20
+ window.dphelper._list.scripts.push( description );
21
+
22
+ /***********************************************************************/
1
23
 
2
24
  window.dphelper.addListenerMulti = ( element, eventNames, listener ) => {
3
25
 
@@ -1,12 +1,24 @@
1
1
  /*!
2
2
  * dpHelper <https://github.com/passariello/dpHelper>
3
- *
4
- * anchorToOnClick
5
- *
6
3
  * Copyright (c) 2021, Dario Passariello.
7
4
  * Licensed under the Apache-2.0 License.
8
5
  */
9
6
 
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Anchor To OnClick",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "anchorToOnClick",
14
+ "subCommand" : [],
15
+ "example" : "",
16
+ "author" : "Dario Passariello",
17
+ "active" : true
18
+ };
19
+
20
+ window.dphelper._list.scripts.push( description );
21
+
10
22
  /***********************************************************************/
11
23
 
12
24
  window.dphelper.anchorToOnClick = function( container ){
package/scripts/array.js CHANGED
@@ -1,12 +1,38 @@
1
1
  /*!
2
2
  * dpHelper <https://github.com/passariello/dpHelper>
3
- *
4
- * arrayDeleteItem
5
- *
6
3
  * Copyright (c) 2021, Dario Passariello.
7
4
  * Licensed under the Apache-2.0 License.
8
5
  */
9
6
 
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Handle Arrays",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "array",
14
+ "subCommand" : [
15
+ {
16
+ "name":"find",
17
+ "description":"test"
18
+ },{
19
+ "name":"unique",
20
+ "description":"test"
21
+ },{
22
+ "name":"delete",
23
+ "description":"test"
24
+ },{
25
+ "name":"merge",
26
+ "description":"test"
27
+ }
28
+ ],
29
+ "example" : "",
30
+ "author" : "Dario Passariello",
31
+ "active" : true
32
+ };
33
+
34
+ window.dphelper._list.scripts.push( description );
35
+
10
36
  /***********************************************************************/
11
37
 
12
38
  window.dphelper.array = {
@@ -0,0 +1,41 @@
1
+ /*!
2
+ * dpHelper <https://github.com/passariello/dpHelper>
3
+ * Copyright (c) 2021, Dario Passariello.
4
+ * Licensed under the Apache-2.0 License.
5
+ */
6
+
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Camel Case / Pascal Case",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "camelCase",
14
+ "subCommand" : [],
15
+ "example" : "",
16
+ "author" : "Dario Passariello",
17
+ "active" : true
18
+ };
19
+
20
+ window.dphelper._list.scripts.push( description );
21
+
22
+ /***********************************************************************/
23
+
24
+ window.dphelper.camelCase = {
25
+
26
+ // toSpace
27
+ toSpace: ( string ) => {
28
+ return string
29
+ .replace(/([A-Z])/g, ' $1')
30
+ .replace(/^./, function(str){ return str.toUpperCase(); })
31
+ },
32
+
33
+ // toUnderscore
34
+ toUnderscore: ( string ) => {
35
+ return string
36
+ .replace(/\.?([A-Z])/g, function (x,y){ return "_" + y.toLowerCase()})
37
+ .replace(/^_/, "");
38
+ },
39
+
40
+ };
41
+
@@ -0,0 +1,86 @@
1
+ /*!
2
+ * dpHelper <https://github.com/passariello/dpHelper>
3
+ * Copyright (c) 2021, Dario Passariello.
4
+ * Licensed under the Apache-2.0 License.
5
+ */
6
+
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Handle Console",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "console",
14
+ "subCommand" : [
15
+ {
16
+ "name":"info",
17
+ "description":"test"
18
+ },{
19
+ "name":"stop",
20
+ "description":"test"
21
+ }
22
+ ],
23
+ "example" : "",
24
+ "author" : "Dario Passariello",
25
+ "active" : true
26
+ };
27
+
28
+ window.dphelper._list.scripts.push( description );
29
+
30
+ /***********************************************************************/
31
+
32
+ window.dphelper.printInfo = () => {
33
+ console.debug( 'dpHelper: Please use "dphelper.path.rail()"' );
34
+ return window.dphelper.console.info();
35
+ };
36
+
37
+ /***********************************************************************/
38
+
39
+ window.dphelper.console = {
40
+
41
+ info: () => {
42
+ console.groupCollapsed('%cApi:%c', "color:orange", "");
43
+ console.debug(dphelper.api);
44
+ console.groupEnd();
45
+ },
46
+
47
+ stop: () => {
48
+
49
+ let console = {};
50
+ console.log = function(){};
51
+ window.console = console;
52
+ if(!window.console) window.console = {};
53
+
54
+ const noop = () => {}
55
+ [
56
+ 'assert',
57
+ 'clear',
58
+ 'count',
59
+ 'debug',
60
+ 'dir',
61
+ 'dirxml',
62
+ 'error',
63
+ 'exception',
64
+ 'group',
65
+ 'groupCollapsed',
66
+ 'groupEnd',
67
+ 'info',
68
+ 'log',
69
+ 'markTimeline',
70
+ 'profile',
71
+ 'profileEnd',
72
+ 'table',
73
+ 'time',
74
+ 'timeEnd',
75
+ 'timeline',
76
+ 'timelineEnd',
77
+ 'timeStamp',
78
+ 'trace',
79
+ 'warn'
80
+ ].forEach((method) => {
81
+ window.console[method] = noop;
82
+ });
83
+
84
+ }
85
+
86
+ };
package/scripts/cookie.js CHANGED
@@ -1,71 +1,97 @@
1
- /*!
2
- * dpHelper <https://github.com/passariello/dpHelper>
3
- *
4
- * cookie
5
- *
6
- * Copyright (c) 2021, Dario Passariello.
7
- * Licensed under the Apache-2.0 License.
8
- */
9
-
10
- /***********************************************************************/
11
-
12
- var CookieType = "Lax";
13
- var CookieSecure = "false";
14
- var CookieSameSite = "false";
15
-
16
- if (location.protocol === 'https:') {
17
- CookieSecure = "Secure";
18
- }
19
-
20
- window.dphelper.cookie = {
21
-
22
- // CREATE THE COOKIE
23
-
24
- set: function( cname , value , time , path = '/' ) {
25
- var d = new Date();
26
- d.setTime( d.getTime() + 3600 * 1000 * 24 * 365 );
27
-
28
- if( !time ) time = d.toGMTString();
29
- if( cname ){
30
- document.cookie = cname + '=' + value + ';expires=' + time + ';path=' + path + ';SameSite=' + CookieSameSite + ';requireSSL='+ CookieSecure +';' + CookieSecure;
31
- }
32
- },
33
-
34
- // GET THE COOKIE
35
-
36
- get: function( cname ) {
37
- var asCookies = document.cookie.split( "; " );
38
-
39
- for ( var i = 0; i < asCookies.length; i++ ){
40
- var asCookie = asCookies[ i ].split( "=" );
41
- if ( cname === asCookie[0] ) return ( unescape( asCookie[1] ) );
42
- }
43
-
44
- return null;
45
- },
46
-
47
- // DELETE THE COOKIE
48
-
49
- delete: function( cname ) {
50
- document.cookie = cname + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;SameSite=' + CookieSameSite + ';requireSSL='+ CookieSecure +';' + CookieSecure;
51
- },
52
-
53
- // CLEAR ALL COOKIE
54
-
55
- clearAll: function() {
56
- var cookies = document.cookie.split(";");
57
-
58
- for ( var i = 0; i < cookies.length; i++ ) {
59
-
60
- var cookie = cookies[i];
61
- var eqPos = cookie.indexOf("=");
62
- var cname = eqPos > -1 ? cookie.slice( 0 , eqPos ) : cookie;
63
- stpro.cookie.delete( cname );
64
-
65
- }
66
- }
67
-
68
- };
69
-
70
- // START COOKIE DB
71
- window.dphelper.cookie.set( "dpHelper", 'active' );
1
+ /*!
2
+ * dpHelper <https://github.com/passariello/dpHelper>
3
+ * Copyright (c) 2021, Dario Passariello.
4
+ * Licensed under the Apache-2.0 License.
5
+ */
6
+
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Cookie",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "cookie",
14
+ "subCommand" : [
15
+ {
16
+ "name":"set",
17
+ "description":"test"
18
+ },{
19
+ "name":"get",
20
+ "description":"test"
21
+ },{
22
+ "name":"delete",
23
+ "description":"test"
24
+ },{
25
+ "name":"clearAll",
26
+ "description":"test"
27
+ }
28
+ ],
29
+ "example" : "",
30
+ "author" : "Dario Passariello",
31
+ "active" : true
32
+ };
33
+
34
+ window.dphelper._list.scripts.push( description );
35
+
36
+ /***********************************************************************/
37
+
38
+ var CookieType = "Lax";
39
+ var CookieSecure = "false";
40
+ var CookieSameSite = "false";
41
+
42
+ if (location.protocol === 'https:') {
43
+ CookieSecure = "Secure";
44
+ }
45
+
46
+ window.dphelper.cookie = {
47
+
48
+ // CREATE THE COOKIE
49
+
50
+ set: function( cname , value , time , path = '/' ) {
51
+ var d = new Date();
52
+ d.setTime( d.getTime() + 3600 * 1000 * 24 * 365 );
53
+
54
+ if( !time ) time = d.toGMTString();
55
+ if( cname ){
56
+ document.cookie = cname + '=' + value + ';expires=' + time + ';path=' + path + ';SameSite=' + CookieSameSite + ';requireSSL='+ CookieSecure +';' + CookieSecure;
57
+ }
58
+ },
59
+
60
+ // GET THE COOKIE
61
+
62
+ get: function( cname ) {
63
+ var asCookies = document.cookie.split( "; " );
64
+
65
+ for ( var i = 0; i < asCookies.length; i++ ){
66
+ var asCookie = asCookies[ i ].split( "=" );
67
+ if ( cname === asCookie[0] ) return ( unescape( asCookie[1] ) );
68
+ }
69
+
70
+ return null;
71
+ },
72
+
73
+ // DELETE THE COOKIE
74
+
75
+ delete: function( cname ) {
76
+ document.cookie = cname + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;SameSite=' + CookieSameSite + ';requireSSL='+ CookieSecure +';' + CookieSecure;
77
+ },
78
+
79
+ // CLEAR ALL COOKIE
80
+
81
+ clearAll: function() {
82
+ var cookies = document.cookie.split(";");
83
+
84
+ for ( var i = 0; i < cookies.length; i++ ) {
85
+
86
+ var cookie = cookies[i];
87
+ var eqPos = cookie.indexOf("=");
88
+ var cname = eqPos > -1 ? cookie.slice( 0 , eqPos ) : cookie;
89
+ stpro.cookie.delete( cname );
90
+
91
+ }
92
+ }
93
+
94
+ };
95
+
96
+ // START COOKIE DB
97
+ window.dphelper.cookie.set( "dpHelper", 'active' );
@@ -1,21 +1,41 @@
1
1
  /*!
2
2
  * dpHelper <https://github.com/passariello/dpHelper>
3
- *
4
- * currency
5
- *
6
3
  * Copyright (c) 2021, Dario Passariello.
7
4
  * Licensed under the Apache-2.0 License.
8
5
  */
9
6
 
10
7
  /***********************************************************************/
11
8
 
12
- window.dphelper.currency = ( val, int = 'en-US', cur = 'USD' ) => {
13
- if( !val || isNaN( val ) ) val = 0;
14
- var formatter = new Intl.NumberFormat( int , {
15
- style: 'currency',
16
- currency: cur,
17
- });
9
+ var description = {
10
+ "name" : "Financial & Currency",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "currency",
14
+ "subCommand" : [
15
+ {
16
+ "name":"convert",
17
+ "description":"test"
18
+ }
19
+ ],
20
+ "example" : "",
21
+ "author" : "Dario Passariello",
22
+ "active" : true
23
+ };
24
+
25
+ window.dphelper._list.scripts.push( description );
26
+
27
+ /***********************************************************************/
28
+
29
+ window.dphelper.currency = {
30
+
31
+ convert: ( val, int = 'en-US', cur = 'USD' ) => {
32
+ if( !val || isNaN( val ) ) val = 0;
33
+ var formatter = new Intl.NumberFormat( int , {
34
+ style: 'currency',
35
+ currency: cur,
36
+ });
37
+ // return ( val ).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')
38
+ return formatter.format( val );
39
+ }
18
40
 
19
- // return ( val ).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')
20
- return formatter.format( val );
21
41
  };
@@ -0,0 +1,101 @@
1
+ /*!
2
+ * dpHelper <https://github.com/passariello/dpHelper>
3
+ * Copyright (c) 2021, Dario Passariello.
4
+ * Licensed under the Apache-2.0 License.
5
+ */
6
+
7
+ /***********************************************************************/
8
+
9
+ var description = {
10
+ "name" : "Date To Iso",
11
+ "description" : "test",
12
+ "version" : "0.0.1",
13
+ "command" : "date",
14
+ "subCommand" : [
15
+ {
16
+ "name":"toIso",
17
+ "description":"test"
18
+ },{
19
+ "name":"toMMDDYYYY",
20
+ "description":"test"
21
+ },{
22
+ "name":"convert",
23
+ "description":"test"
24
+ },{
25
+ "name":"iso2Epoch",
26
+ "description":"test"
27
+ },{
28
+ "name":"localIsoTime",
29
+ "description":"test"
30
+ },{
31
+ "name":"utc",
32
+ "description":"test"
33
+ },{
34
+ "name":"parse",
35
+ "description":"test"
36
+ },
37
+ ],
38
+ "example" : "",
39
+ "author" : "Dario Passariello",
40
+ "active" : true
41
+ };
42
+
43
+ window.dphelper._list.scripts.push( description );
44
+
45
+ /***********************************************************************/
46
+
47
+ window.dphelper.date = {
48
+
49
+ toIso: (value , int = 'en' ) => {
50
+ if (!value) value = '';
51
+ let date = new Date(value);
52
+ if (date == 'Invalid Date') return null; //date = new Date()
53
+ const dateTimeFormat = new Intl.DateTimeFormat( int , {
54
+ year: 'numeric', month: 'long', day: 'numeric',
55
+ });
56
+ return dateTimeFormat.format(date);
57
+ },
58
+
59
+ toMMDDYYYY: (value) => {
60
+ if (!value) value = '';
61
+ let date = new Date(value);
62
+ return ('0' + (date.getMonth() + 1)).slice(-2) + "" + ('0' + date.getDate()).slice(-2) + "" + date.getFullYear();
63
+ },
64
+
65
+ convert: (value , format ) => {
66
+ if( !format) format = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
67
+ if (!value) return null;
68
+ let monthNames = format;
69
+ let month = value.substring(0, 2).replace('0', '');
70
+ let day = value.substring(2, 4);
71
+ let year = value.substring(value.length - 4);
72
+ return day + ' ' + monthNames[Number(month) - 1] + ' ' + year;
73
+ },
74
+
75
+ iso2Epoch: (value) => {
76
+ if (!value) value = '';
77
+ let date = new Date(value);
78
+ let milliseconds = date.getTime();
79
+ return milliseconds;
80
+ },
81
+
82
+ localIsoTime: (value) => {
83
+ if (!value) value = '';
84
+ let tzoffset = (new Date(value)).getTimezoneOffset() * 60000;
85
+ let localISOTime = (new Date(Date.now() - tzoffset)).toISOString().slice(0, -1);
86
+ return localISOTime;
87
+ },
88
+
89
+ utc: () => {
90
+ return moment().toISOString();
91
+ },
92
+
93
+ parse: ( value , separator = '/' ) => {
94
+ if (!value) return null;
95
+ let month = value.substring(0, 2);
96
+ let day = value.substring(2, 4);
97
+ let year = value.substring(4, 8);
98
+ return month + separator + day + separator + year;
99
+ },
100
+
101
+ };