Socket
Socket
Sign inDemoInstall

@pelagiccreatures/sargasso

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pelagiccreatures/sargasso - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

13

lib/Sargasso.js

@@ -26,4 +26,2 @@ /**

const elementMetaData = new WeakMap()
/*

@@ -115,14 +113,7 @@ All subclasses of Sargasso must register the class so that

setMetaData (k, v) {
const data = elementMetaData.get(this.element) || {}
if (v) {
data[k] = v
} else {
delete data[k]
}
elementMetaData.set(this.element, data)
elementTools.setMetaData(this.element, k, v)
}
getMetaData (k) {
const data = elementMetaData.get(this.element) || {}
return data[k]
return elementTools.getMetaData(this.element, k)
}

@@ -129,0 +120,0 @@

21

lib/utils.js

@@ -14,2 +14,4 @@ /**

const elementMetaData = new WeakMap()
const _hasClass = (element, cssClass) => {

@@ -75,2 +77,17 @@ const className = element.className || ''

const _setMetaData = (element, k, v) => {
const data = elementMetaData.get(element) || {}
if (v) {
data[k] = v
} else {
delete data[k]
}
elementMetaData.set(element, data)
}
const _getMetaData = (element, k) => {
const data = elementMetaData.get(element) || {}
return data[k]
}
const elementTools = {

@@ -82,3 +99,5 @@ hasClass: _hasClass,

inViewPort: _inViewPort,
setCSS: _css
setCSS: _css,
setMetaData: _setMetaData,
getMetaData: _getMetaData
}

@@ -85,0 +104,0 @@

{
"name": "@pelagiccreatures/sargasso",
"version": "0.7.1",
"version": "0.7.2",
"description": "Simple, Fast, Reactive, supervised Javascript controllers for html elements.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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