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.18 to 1.0.19

2

package.json
{
"name": "helper-js",
"version": "1.0.18",
"version": "1.0.19",
"description": "",

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

@@ -74,8 +74,8 @@ // local store

return str
.replace(/ /g, '-')
.replace(/_/g, '-')
.replace(/([^A-Z])([A-Z])/g, '$1-$2')
.replace(/--+/g, '-')
.replace(/^-|-$|/g, '')
.toLowerCase()
.replace(/ /g, '-')
.replace(/_/g, '-')
.replace(/([^A-Z])([A-Z])/g, '$1-$2')
.replace(/--+/g, '-')
.replace(/^-|-$|/g, '')
.toLowerCase()
}

@@ -216,2 +216,9 @@ export function camelCase (str) {

}
// function
export function executeWithCount(func, context) {
let count = 0
return (...args) => {
return func.apply(context, args.concat(count++))
}
}
// url

@@ -301,3 +308,3 @@ /* eslint-disable */

if (el.classList)
{ el.classList.add(className) }
{ el.classList.add(className) }
else

@@ -310,3 +317,3 @@ { el.className += ' ' + className }

if (el.classList)
{ el.classList.remove(className) }
{ el.classList.remove(className) }
else

@@ -372,5 +379,5 @@ { el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ') }

export function onDOM(el, name, handler) {
if (el.addEventListener) { // 所有主流浏览器,除了 IE 8 及更早 IE版本
if (el.addEventListener) { // 所有主流浏览器,除了 IE 8 及更早 IE版本
el.addEventListener(name, handler)
} else if (el.attachEvent) { // IE 8 及更早 IE 版本
} else if (el.attachEvent) { // IE 8 及更早 IE 版本
el.attachEvent(`on${name}`, handler)

@@ -380,5 +387,5 @@ }

export function offDOM(el, name, handler) {
if (el.removeEventListener) { // 所有主流浏览器,除了 IE 8 及更早 IE版本
if (el.removeEventListener) { // 所有主流浏览器,除了 IE 8 及更早 IE版本
el.removeEventListener(name, handler)
} else if (el.detachEvent) { // IE 8 及更早 IE 版本
} else if (el.detachEvent) { // IE 8 及更早 IE 版本
el.detachEvent(`on${name}`, handler)

@@ -385,0 +392,0 @@ }

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