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

material

Package Overview
Dependencies
Maintainers
0
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material - npm Package Compare versions

Comparing version 0.9.16 to 0.9.18

2

package.json
{
"name": "material",
"version": "0.9.16",
"version": "0.9.18",
"description": "A lightweight implementation of Material Design Components for the web - ES6",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,3 +19,3 @@ class Element {

for (const key in this.options) {
if (!['tag', 'container', 'html', 'text', 'id'].includes(key)) {
if (!['tag', 'container', 'html', 'text', 'id', 'data'].includes(key)) {
element.setAttribute(key, this.options[key])

@@ -25,2 +25,7 @@ }

// Apply additional dataset
for (const key in this.options.data) {
element.setAttribute('data-' + key, this.options.data[key])
}
// Append to container if available

@@ -27,0 +32,0 @@ if (this.options.container) {

@@ -0,4 +1,7 @@

import emitter from './module/emitter'
class Loader {
static defaults = {
class: 'loader'
class: 'loader',
timeout: 10000
}

@@ -13,2 +16,3 @@

this.options = { ...Loader.defaults, ...options }
Object.assign(this, emitter)
}

@@ -81,5 +85,15 @@

this.element.classList.add('show')
clearTimeout(this.timeout)
if (this.options.timeout) {
this.timeout = setTimeout(() => {
this.hide()
this.emit('timeout')
}, this.options.timeout)
}
}
hide () {
clearTimeout(this.timeout)
this.element.classList.remove('show')

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