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

bradpitt

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bradpitt - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

dist/bradpitt.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(this,function(){"use strict";function e(e,t,n){var o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],i=o.change||"add",s=function(e){switch(i){case"add":e.classList.add(t);break;case"remove":e.classList.remove(t);break;case"toggle":e.classList.toggle(t);break;default:console.log("invalid value for change option specified")}},a=function(e){setTimeout(function(){s(e)},n)};return e.length?Array.from(e,function(e){a(e)}):a(e),this}exports.lazy=e});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(this,function(){"use strict";function e(e,n,o){var i=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],a=i.change||"add",s=function(e){setTimeout(function(){t(e,a,n)},o)};return e.length?Array.from(e,function(e){s(e)}):s(e),this}var t=function(e,t,n){switch(t){case"add":e.classList.add(n);break;case"remove":e.classList.remove(n);break;case"toggle":e.classList.toggle(n);break;default:console.log("invalid value for change option specified")}};exports.lazy=e});
{
"name": "bradpitt",
"version": "0.0.9",
"version": "0.0.10",
"description": "Set of javascript modules that do cool stuff",

@@ -5,0 +5,0 @@ "main": "dist/bradpitt.min.js",

let classSwap = (e, change, className) => {
switch(change) {
case 'add':
e.classList.add(className)
break
case 'remove':
e.classList.remove(className)
break
case 'toggle':
e.classList.toggle(className)
break
default:
console.log('invalid value for change option specified')
}
}
/**

@@ -13,19 +27,4 @@ * @param {object|...array} el dom element/s

let change = options.change || 'add'
let classSwap = (e) => {
switch(change) {
case 'add':
e.classList.add(className)
break
case 'remove':
e.classList.remove(className)
break
case 'toggle':
e.classList.toggle(className)
break
default:
console.log('invalid value for change option specified')
}
}
let sT = (e) => {
setTimeout(() => { classSwap(e) }, timing)
setTimeout(() => { classSwap(e, change, className) }, timing)
}

@@ -32,0 +31,0 @@ el.length ? Array.from(el, (e) => { sT(e) }) : sT(el)

Sorry, the diff of this file is not supported yet

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