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

helper-js

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helper-js - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

10

dist/helper-js.common.js
/*!
* helper-js v1.0.7
* helper-js v1.0.8
* phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -201,3 +201,8 @@ * https://github.com/phphe/helper-js.git

}
function unset(obj, prop) {
obj[prop] = undefined;
try {
delete obj[prop];
} catch (e) {}
}
// url

@@ -427,2 +432,3 @@ /* eslint-disable */

exports.objectSet = objectSet;
exports.unset = unset;
exports.getUrlParam = getUrlParam;

@@ -429,0 +435,0 @@ exports.uniqueId = uniqueId;

11

dist/helper-js.esm.js
/*!
* helper-js v1.0.7
* helper-js v1.0.8
* phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -197,3 +197,8 @@ * https://github.com/phphe/helper-js.git

}
function unset(obj, prop) {
obj[prop] = undefined;
try {
delete obj[prop];
} catch (e) {}
}
// url

@@ -393,2 +398,2 @@ /* eslint-disable */

export { isset, isArray, isBool, isNumber, isNumeric, isString, isObject, isFunction, isPromise, empty, numRand, numPad, studlyCase, snakeCase, camelCase, camelToWords, titleCase, strRand, replaceMultiple, arrayRemove, arrayFirst, arrayLast, arrayDiff, assignIfDifferent, objectMerge, objectMap, objectOnly, objectExcept, objectGet, objectSet, getUrlParam, uniqueId, isDescendantOf, getOffset, findParent, hasClass, isOffsetInEl, getBorder, binarySearch, windowLoaded, storeOfWaitFor, waitFor };
export { isset, isArray, isBool, isNumber, isNumeric, isString, isObject, isFunction, isPromise, empty, numRand, numPad, studlyCase, snakeCase, camelCase, camelToWords, titleCase, strRand, replaceMultiple, arrayRemove, arrayFirst, arrayLast, arrayDiff, assignIfDifferent, objectMerge, objectMap, objectOnly, objectExcept, objectGet, objectSet, unset, getUrlParam, uniqueId, isDescendantOf, getOffset, findParent, hasClass, isOffsetInEl, getBorder, binarySearch, windowLoaded, storeOfWaitFor, waitFor };
/*!
* helper-js v1.0.7
* helper-js v1.0.8
* phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -203,3 +203,8 @@ * https://github.com/phphe/helper-js.git

}
function unset(obj, prop) {
obj[prop] = undefined;
try {
delete obj[prop];
} catch (e) {}
}
// url

@@ -429,2 +434,3 @@ /* eslint-disable */

exports.objectSet = objectSet;
exports.unset = unset;
exports.getUrlParam = getUrlParam;

@@ -431,0 +437,0 @@ exports.uniqueId = uniqueId;

/*!
* helper-js v1.0.7
* helper-js v1.0.8
* phphe <phphe@outlook.com> (https://github.com/phphe)

@@ -8,3 +8,3 @@ * https://github.com/phphe/helper-js.git

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.helperJs=e.helperJs||{})}(this,function(e){"use strict";function t(e){return void 0!==e}function n(e){return"[object Array]"===Object.prototype.toString.call(e)}function r(e){return"[object Boolean]"===Object.prototype.toString.call(e)}function o(e){return"[object Number]"===Object.prototype.toString.call(e)}function i(e){var t=parseFloat(e);return!isNaN(t)&&o(t)}function u(e){return"[object String]"===Object.prototype.toString.call(e)}function a(e){return"[object Object]"===Object.prototype.toString.call(e)}function f(e){return"function"==typeof e}function c(e){return"[object Promise]"===Object.prototype.toString.call(e)}function l(e){return null==e||(null!=e.length?0===e.length:!r(e)&&(o(e)?isNaN(e):a(e)?0===Object.keys(e).length:void 0))}function s(e,t){return 1===arguments.length&&(t=e,e=0),Math.floor(Math.random()*(t-e+1)+e)}function d(e,t){for(var n=e.toString().length;n<t;)e="0"+e,n++;return e}function p(e){return e&&e[0].toUpperCase()+e.substr(1)}function g(e){return e.replace(/ /g,"-").replace(/_/g,"-").replace(/([^A-Z])([A-Z])/g,"$1-$2").replace(/--+/g,"-").replace(/^-|-$|/g,"").toLowerCase()}function v(e){for(var t=e.toString().split(/[-_]/),n=1;n<t.length;n++)t[n]=p(t[n]);return t.join("")}function h(e){return e.toString().trim().split(/(?=[A-Z])/)}function m(e){return h(p(v(e))).join(" ").replace(/\bid\b/gi,"ID")}function y(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=0;o<e;o++)n+=r[s(r.length-1)];return t+n}function b(e,t){var n=new RegExp(Object.keys(e).join("|"),"g");return t.replace(n,function(t){return e[t]})}function w(e,t){var n=e.indexOf(t);return n>-1&&e.splice(n,1),e}function j(e){return e[0]}function O(e){return e[e.length-1]}function x(e,t){for(var n=e.length,r=[];n--;)t.indexOf(e[n])<0&&r.push(e[n]);return r}function E(e,t,n){e[t]!==n&&(e[t]=n)}function S(e,t){for(var n in t)e.hasOwnProperty(n)&&a(e[n])&&a(t[n])?Object.assign(e[n],t[n]):e[n]=t[n];return e}function P(e,t){var n={};for(var r in e)n[r]=t(e[r],r,e);return n}function I(e,t){var n={};for(var r in e)t.indexOf(r)>-1&&(n[r]=e[r]);return n}function L(e,t){var n={};for(var r in e)-1===t.indexOf(r)&&(n[r]=e[r]);return n}function N(e,t){for(var n=t.split("."),r=e,o=0;o<n.length;o++){if(void 0===r[n[o]])return;r=r[n[o]]}return r}function C(e,t,n){for(var r=t.split("."),o=r.length-1,i=0;i<o;i++)null==e[r[i]]&&(e[r[i]]={}),e=e[r[i]];e[r[o]]=n}function M(e){var t=document.location.href,n=t.indexOf(e+"=");if(-1==n)return!1;var r=t.slice(e.length+n+1),o=r.indexOf("&");return-1!=o&&(r=r.slice(0,o)),r}function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id_",t=e+y();return document.getElementById(t)||$.includes(t)?F(e):($.push(t),t)}function A(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}}function H(e){function t(e){var n={x:e.offsetLeft,y:e.offsetTop},r={x:0,y:0};return null!=e.offsetParent&&(r=t(e.offsetParent)),{x:n.x+r.x,y:n.y+r.y}}return t(e)}function R(e,t){function n(e,t){if(e.parentElement)return t(e.parentElement)?e.parentElement:n(e.parentElement,t)}return n(e,t)}function k(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function B(e,t,n){var r=H(n);return r.x<=e&&r.x+n.offsetWidth>=e&&r.y<=t&&r.y+n.offsetHeight>=t}function D(e){var t=document.body,n=R(e,function(e){return k(e,"work-area")}),r=H(n);return{left:r.x,right:r.x+n.offsetWidth,top:r.y+50,bottom:t.offsetHeight<window.innerHeight?window.innerHeight:t.offsetHeight}}function W(e,t){for(var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=0,u=e.length-1,a=0;i>=0&&i<=u;){if(a>=o)throw Error("binarySearch: loop times is over "+o+", you can increase the limit.");n=Math.floor((u-i)/2+i),r=e[n];var f=t(r,e,a);if(f<0)u=n-1;else{if(!(f>0))return r;i=n+1}a++}return null}function _(){return new Promise(function(e,t){document&&"complete"===document.readyState?e():window.addEventListener("load",function t(){e(),window.removeEventListener("load",t)})})}function Z(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;f(e)&&(o=r,r=i(n)?n:100,n=e,e=null);var u=J;return e&&t(u[e])&&(window.clearInterval(u[e]),delete u[e]),new Promise(function(i,a){function f(t){l<=o?n()&&(c(t,e),i()):(c(t,e),a(new Error("waitFor: Limit is reached"))),l++}function c(e,n){e&&(n&&t(u[n])?(window.clearInterval(u[n]),delete u[n]):window.clearInterval(e))}var l=0,s=window.setInterval(function(){f(s)},r);e&&(u[e]=s),f()})}var $=[],J={};e.isset=t,e.isArray=n,e.isBool=r,e.isNumber=o,e.isNumeric=i,e.isString=u,e.isObject=a,e.isFunction=f,e.isPromise=c,e.empty=l,e.numRand=s,e.numPad=d,e.studlyCase=p,e.snakeCase=g,e.camelCase=v,e.camelToWords=h,e.titleCase=m,e.strRand=y,e.replaceMultiple=b,e.arrayRemove=w,e.arrayFirst=j,e.arrayLast=O,e.arrayDiff=x,e.assignIfDifferent=E,e.objectMerge=S,e.objectMap=P,e.objectOnly=I,e.objectExcept=L,e.objectGet=N,e.objectSet=C,e.getUrlParam=M,e.uniqueId=F,e.isDescendantOf=A,e.getOffset=H,e.findParent=R,e.hasClass=k,e.isOffsetInEl=B,e.getBorder=D,e.binarySearch=W,e.windowLoaded=_,e.storeOfWaitFor=J,e.waitFor=Z,Object.defineProperty(e,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.helperJs=t.helperJs||{})}(this,function(t){"use strict";function e(t){return void 0!==t}function n(t){return"[object Array]"===Object.prototype.toString.call(t)}function r(t){return"[object Boolean]"===Object.prototype.toString.call(t)}function o(t){return"[object Number]"===Object.prototype.toString.call(t)}function i(t){var e=parseFloat(t);return!isNaN(e)&&o(e)}function u(t){return"[object String]"===Object.prototype.toString.call(t)}function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function c(t){return"function"==typeof t}function f(t){return"[object Promise]"===Object.prototype.toString.call(t)}function l(t){return null==t||(null!=t.length?0===t.length:!r(t)&&(o(t)?isNaN(t):a(t)?0===Object.keys(t).length:void 0))}function s(t,e){return 1===arguments.length&&(e=t,t=0),Math.floor(Math.random()*(e-t+1)+t)}function d(t,e){for(var n=t.toString().length;n<e;)t="0"+t,n++;return t}function p(t){return t&&t[0].toUpperCase()+t.substr(1)}function g(t){return t.replace(/ /g,"-").replace(/_/g,"-").replace(/([^A-Z])([A-Z])/g,"$1-$2").replace(/--+/g,"-").replace(/^-|-$|/g,"").toLowerCase()}function v(t){for(var e=t.toString().split(/[-_]/),n=1;n<e.length;n++)e[n]=p(e[n]);return e.join("")}function h(t){return t.toString().trim().split(/(?=[A-Z])/)}function m(t){return h(p(v(t))).join(" ").replace(/\bid\b/gi,"ID")}function y(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=0;o<t;o++)n+=r[s(r.length-1)];return e+n}function b(t,e){var n=new RegExp(Object.keys(t).join("|"),"g");return e.replace(n,function(e){return t[e]})}function w(t,e){var n=t.indexOf(e);return n>-1&&t.splice(n,1),t}function j(t){return t[0]}function O(t){return t[t.length-1]}function x(t,e){for(var n=t.length,r=[];n--;)e.indexOf(t[n])<0&&r.push(t[n]);return r}function E(t,e,n){t[e]!==n&&(t[e]=n)}function S(t,e){for(var n in e)t.hasOwnProperty(n)&&a(t[n])&&a(e[n])?Object.assign(t[n],e[n]):t[n]=e[n];return t}function P(t,e){var n={};for(var r in t)n[r]=e(t[r],r,t);return n}function I(t,e){var n={};for(var r in t)e.indexOf(r)>-1&&(n[r]=t[r]);return n}function L(t,e){var n={};for(var r in t)-1===e.indexOf(r)&&(n[r]=t[r]);return n}function N(t,e){for(var n=e.split("."),r=t,o=0;o<n.length;o++){if(void 0===r[n[o]])return;r=r[n[o]]}return r}function C(t,e,n){for(var r=e.split("."),o=r.length-1,i=0;i<o;i++)null==t[r[i]]&&(t[r[i]]={}),t=t[r[i]];t[r[o]]=n}function M(t,e){t[e]=void 0;try{delete t[e]}catch(t){}}function F(t){var e=document.location.href,n=e.indexOf(t+"=");if(-1==n)return!1;var r=e.slice(t.length+n+1),o=r.indexOf("&");return-1!=o&&(r=r.slice(0,o)),r}function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id_",e=t+y();return document.getElementById(e)||J.includes(e)?A(t):(J.push(e),e)}function H(t,e){for(;;){if(null==t.parentElement)return!1;if(t.parentElement===e)return!0;t=t.parentElement}}function R(t){function e(t){var n={x:t.offsetLeft,y:t.offsetTop},r={x:0,y:0};return null!=t.offsetParent&&(r=e(t.offsetParent)),{x:n.x+r.x,y:n.y+r.y}}return e(t)}function k(t,e){function n(t,e){if(t.parentElement)return e(t.parentElement)?t.parentElement:n(t.parentElement,e)}return n(t,e)}function B(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)}function D(t,e,n){var r=R(n);return r.x<=t&&r.x+n.offsetWidth>=t&&r.y<=e&&r.y+n.offsetHeight>=e}function W(t){var e=document.body,n=k(t,function(t){return B(t,"work-area")}),r=R(n);return{left:r.x,right:r.x+n.offsetWidth,top:r.y+50,bottom:e.offsetHeight<window.innerHeight?window.innerHeight:e.offsetHeight}}function _(t,e){for(var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,i=0,u=t.length-1,a=0;i>=0&&i<=u;){if(a>=o)throw Error("binarySearch: loop times is over "+o+", you can increase the limit.");n=Math.floor((u-i)/2+i),r=t[n];var c=e(r,t,a);if(c<0)u=n-1;else{if(!(c>0))return r;i=n+1}a++}return null}function Z(){return new Promise(function(t,e){document&&"complete"===document.readyState?t():window.addEventListener("load",function e(){t(),window.removeEventListener("load",e)})})}function $(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;c(t)&&(o=r,r=i(n)?n:100,n=t,t=null);var u=T;return t&&e(u[t])&&(window.clearInterval(u[t]),delete u[t]),new Promise(function(i,a){function c(e){l<=o?n()&&(f(e,t),i()):(f(e,t),a(new Error("waitFor: Limit is reached"))),l++}function f(t,n){t&&(n&&e(u[n])?(window.clearInterval(u[n]),delete u[n]):window.clearInterval(t))}var l=0,s=window.setInterval(function(){c(s)},r);t&&(u[t]=s),c()})}var J=[],T={};t.isset=e,t.isArray=n,t.isBool=r,t.isNumber=o,t.isNumeric=i,t.isString=u,t.isObject=a,t.isFunction=c,t.isPromise=f,t.empty=l,t.numRand=s,t.numPad=d,t.studlyCase=p,t.snakeCase=g,t.camelCase=v,t.camelToWords=h,t.titleCase=m,t.strRand=y,t.replaceMultiple=b,t.arrayRemove=w,t.arrayFirst=j,t.arrayLast=O,t.arrayDiff=x,t.assignIfDifferent=E,t.objectMerge=S,t.objectMap=P,t.objectOnly=I,t.objectExcept=L,t.objectGet=N,t.objectSet=C,t.unset=M,t.getUrlParam=F,t.uniqueId=A,t.isDescendantOf=H,t.getOffset=R,t.findParent=k,t.hasClass=B,t.isOffsetInEl=D,t.getBorder=W,t.binarySearch=_,t.windowLoaded=Z,t.storeOfWaitFor=T,t.waitFor=$,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=helper-js.min.js.map
{
"name": "helper-js",
"version": "1.0.7",
"version": "1.0.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/helper-js.common.js",

@@ -193,3 +193,8 @@ // is 各种判断

}
export function unset(obj, prop) {
obj[prop] = undefined
try {
delete obj[prop]
} catch (e) {}
}
// url

@@ -196,0 +201,0 @@ /* eslint-disable */

Sorry, the diff of this file is not supported yet

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