New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cm-web-modules

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cm-web-modules - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

2

package.json
{
"name": "cm-web-modules",
"version": "2.0.4",
"version": "2.0.5",
"description": "Collection of clean and small ES6 modules for the web",

@@ -5,0 +5,0 @@ "main": "src/LibraryManager.js",

@@ -9,9 +9,16 @@ /**

static debounce(func, timeout = 0) {
let timer
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => {
func.apply(this, args)
}, timeout)
static debounce(callback, wait = 0, immediate = false) {
let timeout
return function executedFunction(...args) {
if (immediate && !timeout) {
callback(...args)
timeout = true
} else {
const debounced = () => {
clearTimeout(timeout)
callback(...args)
}
clearTimeout(timeout)
timeout = setTimeout(debounced, wait)
}
}

@@ -18,0 +25,0 @@ }

@@ -52,3 +52,3 @@ /**

static isBrowserDarkMode() {
return !!(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)
return !!(window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches)
}

@@ -58,8 +58,8 @@

return window.matchMedia &&
(window.matchMedia('(prefers-color-scheme: dark)').matches ||
window.matchMedia('(prefers-color-scheme: light)').matches)
(window.matchMedia("(prefers-color-scheme: dark)").matches ||
window.matchMedia("(prefers-color-scheme: light)").matches)
}
static loadJs(src) {
const element = document.createElement('script')
const element = document.createElement("script")
element.setAttribute("type", "text/javascript")

@@ -83,7 +83,7 @@ element.setAttribute("src", src)

static getCustomProperty(name, element = document.documentElement) {
return getComputedStyle(element).getPropertyValue('--' + name).trim()
return getComputedStyle(element).getPropertyValue("--" + name).trim()
}
static createElement(html) {
const template = document.createElement('template')
const template = document.createElement("template")
template.innerHTML = html.trim()

@@ -130,3 +130,3 @@ return template.content.firstChild

if (links[i].hostname !== window.location.hostname && target !== "_self") {
links[i].target = '_blank'
links[i].target = "_blank"
}

@@ -133,0 +133,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