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

material

Package Overview
Dependencies
Maintainers
3
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.10 to 0.9.11

2

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

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

@@ -1,13 +0,33 @@

import Control from './control'
import Component from './component'
import events from '../module/events'
class View extends Control {
static default = {
base = 'view'
}
class View extends Component {
static base = 'view'
constructor (options) {
super(options)
this.events = {}
if (this.options.events) {
events.attach(this.options.events, this)
}
}
on (event, listener) {
if (!this.events[event]) {
this.events[event] = []
}
this.events[event].push(listener)
return this
}
emit (event, ...args) {
if (this.events[event]) {
this.events[event].forEach(listener => listener.apply(this, args))
}
return this
}
}
export default View
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