Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

util-io

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

util-io - npm Package Compare versions

Comparing version 1.2.4 to 1.3.0

13

HELP.md

@@ -53,3 +53,3 @@ ---

```js
Util.retExec(callback, p1, p2, pN);
Util.exec.ret(callback, p1, p2, pN);
```

@@ -95,14 +95,11 @@

```js
var fs = require('fs');
var fs = require('fs'),
Util = require('util-io');
Util.exec.parallel([
function(callback) {
fs.readFile('file1', function(error, data) {
callback(error, data);
});
fs.readFile('file1', callback);
},
function(callback) {
fs.readFile('file2', function(error, data) {
callback(error, data);
});
fs.readFile('file2', callback);
}

@@ -109,0 +106,0 @@ ], function(error, data1, data2) {

@@ -166,66 +166,2 @@ (function(scope) {

/**
* Check is Properties exists and they are true if neaded
*
* @param pObj
* @param pPropArr
* @param pTrueArr
*/
this.checkObj = function(pObj, pPropArr, pTrueArr) {
var ret,
i, n;
if (pObj) {
ret = Util.isArray(pPropArr);
if (ret) {
n = pPropArr.length;
for (i = 0; i < n; i++) {
var lProp = pPropArr[i];
ret = pObj.hasOwnProperty(lProp);
if (!ret) {
console.trace();
Util.logError(lProp + ' not in Obj!');
Util.log(pObj);
break;
}
}
}
if (ret && Util.isArray(pTrueArr))
ret = Util.checkObjTrue(pObj, pTrueArr);
}
return ret;
};
/**
* Check is Properties exists and they are true
*
* @param pObj
* @param pPropArr
* @param pTrueArr
*/
this.checkObjTrue = function(pObj, pTrueArr) {
var ret, lTrueArr,
i, n;
if (pObj) {
lTrueArr = Util.isArray(pTrueArr) ? pTrueArr : [pTrueArr];
n = lTrueArr.length;
for(i = 0; i < n; i++) {
var lProp = lTrueArr[i];
ret = pObj[lProp];
if (!ret) {
console.trace();
Util.logError(lProp + ' not true!');
Util.log(pObj);
break;
}
}
}
return ret;
};
/**
* Copy properties from from to to

@@ -282,3 +218,3 @@ *

*/
this.extendProto = function(obj) {
this.extendProto = function(obj) {
var ret, F = function() {};

@@ -289,3 +225,3 @@ F.prototype = Util.extend({}, obj);

return ret;
};
};

@@ -372,11 +308,11 @@ /**

case 'array':
n = str2.length;
n = str2.length;
for (i = 0; i < n; i++) {
str = str2[i];
is = Util.isContainStr(str1, str);
for (i = 0; i < n; i++) {
str = str2[i];
is = Util.isContainStr(str1, str);
if (is)
break;
}
}
break;

@@ -539,3 +475,3 @@

return str;
return str;
};

@@ -689,3 +625,3 @@

*/
this.isString = function(variable) {
this.isString = function(variable) {
return Util.isType(variable, 'string');

@@ -698,3 +634,3 @@ };

*/
this.isUndefined = function(variable) {
this.isUndefined = function(variable) {
return Util.isType(variable, 'undefined');

@@ -701,0 +637,0 @@ };

{
"name": "util-io",
"version": "1.2.4",
"version": "1.3.0",
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

@@ -5,0 +5,0 @@ "description": "Util.io - utilites for vanila js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc