puvox-library 1.0.73 → 1.0.74

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 (2) hide show
  1. package/library_standard.js +10 -10
  2. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  class PuvoxLibrary {
19
- self = this;
19
+ selfMain = this;
20
20
 
21
21
  // ########## ARRAY ########## //
22
22
  arrayValue(obj_arr, key, default_){
@@ -89,7 +89,7 @@ class PuvoxLibrary {
89
89
  return source.filter(x => comparedTo.includes(x));
90
90
  }
91
91
  arrayDiffFull(o1,o2) {
92
- const self = this;
92
+ const selfFunc = this;
93
93
  const typeObject = function(o){
94
94
  return typeof o === 'object';
95
95
  };
@@ -113,7 +113,7 @@ class PuvoxLibrary {
113
113
  else if (Object.is(o1, o2)) {
114
114
  return undefined;
115
115
  } else if (bothAreArrays(o1,o2)){
116
- return self.arrayDiff(o1,o2);
116
+ return selfFunc.arrayDiff(o1,o2);
117
117
  }
118
118
  const keys = Object.keys(o2);
119
119
  for (let i=0; i<keys.length; i++) {
@@ -873,7 +873,7 @@ class PuvoxLibrary {
873
873
 
874
874
 
875
875
  datetime = new (class{
876
- MAIN_CLASS = self;
876
+ MAIN_CLASS = selfMain;
877
877
  // 0940 type time-ints
878
878
  isBetweenHMS(target, start, end, equality) { } // datetime, int/datetime, int/datetime, bool
879
879
  equalDays(d1,d2) {
@@ -1174,7 +1174,7 @@ class PuvoxLibrary {
1174
1174
  return prom;
1175
1175
  }
1176
1176
  async linesAmountInFile(filePath, delimiterN = true) {
1177
- const self = this;
1177
+ const selfFunc = this;
1178
1178
  // calblack format: callback(linesArray, isLastChunk)
1179
1179
  let resolver = null;
1180
1180
  let rejector = null;
@@ -1186,7 +1186,7 @@ class PuvoxLibrary {
1186
1186
  let linesAmount = 0;
1187
1187
  readStream.on('data', async function(chunk) {
1188
1188
  const ch = chunk + '';
1189
- const curLenth = self.occurences_amount(ch, '\n');
1189
+ const curLenth = selfFunc.occurences_amount(ch, '\n');
1190
1190
  linesAmount = linesAmount + curLenth;
1191
1191
  });
1192
1192
  readStream.on('end', async function() {
@@ -2868,7 +2868,7 @@ class PuvoxLibrary {
2868
2868
 
2869
2869
  // ######## Cookies: https://github.com/ttodua/useful-javascript/blob/master/cookies-library.js ######## //
2870
2870
  Cookies = new (class{
2871
- MAIN_CLASS = self;
2871
+ MAIN_CLASS = selfMain;
2872
2872
  get(a,b) { return this.cookies_instance().get(a,b); }
2873
2873
  set(a,b,c) { return this.cookies_instance().set(a,b); }
2874
2874
  remove(a, b) {return this.cookies_instance().remove(a,b); }
@@ -2938,7 +2938,7 @@ class PuvoxLibrary {
2938
2938
 
2939
2939
 
2940
2940
  cache = new (class{
2941
- MAIN_CLASS = self;
2941
+ MAIN_CLASS = selfMain;
2942
2942
  helper_read(groupName, storageType, expireSeconds = 0){
2943
2943
  const appName = this.MAIN_CLASS.getAppName();
2944
2944
  if (storageType === 'file'){
@@ -3040,7 +3040,7 @@ class PuvoxLibrary {
3040
3040
 
3041
3041
 
3042
3042
  file = new (class {
3043
- MAIN_CLASS = self;
3043
+ MAIN_CLASS = selfMain;
3044
3044
  // ########## CACHE DIRS (server-side JS) ##########
3045
3045
  customCacheDir = null;
3046
3046
  get_dir(){
@@ -3176,7 +3176,7 @@ class PuvoxLibrary {
3176
3176
  // }
3177
3177
  // },
3178
3178
  file = new (class {
3179
- MAIN_CLASS = self;
3179
+ MAIN_CLASS = selfMain;
3180
3180
  // support for several native modules
3181
3181
  set_module(module) {
3182
3182
  // 'fs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puvox-library",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "library-class-javascript",
5
5
  "main": "library_standard.js",
6
6
  "scripts": {