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

element-class

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

element-class - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

test.js

5

index.js

@@ -9,3 +9,6 @@ module.exports = function(opts) {

if (!opts) opts = {}
if (opts instanceof HTMLElement) opts = {el: opts}
// similar doing instanceof HTMLElement but works in IE8
if (opts.nodeType) opts = {el: opts}
this.opts = opts

@@ -12,0 +15,0 @@ this.el = opts.el || document.body

42

package.json
{
"name": "element-class",
"description": "add and remove classes from dom elements",
"author": {"name": "Max Ogden", "email": "max@maxogden.com"},
"repository": {"type": "git", "url": "git@github.com:maxogden/element-class.git"},
"version": "0.1.0"
}
"author": "Max Ogden <max@maxogden.com>",
"repository": {
"type": "git",
"url": "git@github.com:maxogden/element-class.git"
},
"version": "0.1.1",
"bugs": {
"url": "https://github.com/maxogden/element-class/issues"
},
"homepage": "https://github.com/maxogden/element-class",
"main": "index.js",
"dependencies": {
"inherits": "~1.0.0"
},
"devDependencies": {
"tape": "^2.10.2"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"license": "ISC",
"testling": {
"files": "test.js",
"browsers": [
"ie/8..latest",
"firefox/17..latest",
"firefox/nightly",
"chrome/22..latest",
"chrome/canary",
"opera/12..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
}
}
# element-class
exactly like .addClass, .removeClass and .hasClass from jquery but with dependencies
exactly like .addClass, .removeClass and .hasClass from jquery but without dependencies

@@ -10,3 +10,3 @@ ```

```javascript
var elementClass = require('elementClass')
var elementClass = require('element-class')

@@ -13,0 +13,0 @@ // get an element

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