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

storyblok-react

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storyblok-react - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

lib/sb-editable.d.ts

7

lib/sb-editable.js

@@ -50,2 +50,7 @@ 'use strict';

}, {
key: 'hasClass',
value: function hasClass(el, className) {
return el.classList ? el.classList.contains(className) : new RegExp('\\b' + className + '\\b').test(el.className);
}
}, {
key: 'addClass',

@@ -55,3 +60,3 @@ value: function addClass(el, className) {

el.classList.add(className);
} else if (!hasClass(el, className)) {
} else if (!this.hasClass(el, className)) {
el.className += ' ' + className;

@@ -58,0 +63,0 @@ }

3

package.json
{
"name": "storyblok-react",
"version": "0.0.4",
"version": "0.0.5",
"description": "React component for storyblok.",

@@ -14,2 +14,3 @@ "keywords": [

"main": "./lib/sb-editable.js",
"types": "./lib/sb-editable.d.ts",
"scripts": {

@@ -16,0 +17,0 @@ "build": "babel -d lib/ src/ && date",

@@ -24,6 +24,10 @@ import React from 'react'

hasClass(el, className) {
return el.classList ? el.classList.contains(className) : new RegExp('\\b'+ className+'\\b').test(el.className)
}
addClass(el, className) {
if (el.classList) {
el.classList.add(className)
} else if (!hasClass(el, className)) {
} else if (!this.hasClass(el, className)) {
el.className += ' ' + className

@@ -30,0 +34,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