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

dmp-template-data

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dmp-template-data - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

spec/getVariationsSpec.js

3

karma.conf.js

@@ -6,3 +6,4 @@ module.exports = function(config) {

files: [
{ pattern: 'spec/**/*-spec.js', watched: false }
'node_modules/babel-polyfill/dist/polyfill.js',
{ pattern: 'spec/**/*Spec.js', watched: false }
],

@@ -9,0 +10,0 @@ frameworks: ['jasmine'],

{
"name": "dmp-template-data",
"version": "0.0.1",
"version": "0.1.0",
"description": "component to analyze template DOM",

@@ -22,3 +22,3 @@ "main": "src/index.js",

"babel-loader": "^6.2.4",
"babel-polyfill": "^6.9.0",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.6.0",

@@ -25,0 +25,0 @@ "babel-register": "^6.8.0",

@@ -24,4 +24,4 @@ # dmp-template-data

* `dom` <Document Object>
* `name`<String>
* `dom` < Document Object >
* `name`< String >

@@ -38,4 +38,4 @@ The `templateData.metaTagValue` function returns the content of requested meta tag.

* `dom` <Document Object>
* `name`<String>
* `dom` < Document Object >
* `name`< String >

@@ -52,3 +52,3 @@ The `templateData.hasMetaTag` function returns true if requested meta tag exists.

* `dom` <Document Object>
* `dom` < Document Object >

@@ -66,4 +66,4 @@ The `templateData.hasBackgroundArea` function returns true if

* `dom` <Document Object>
* `type` <String>
* `dom` < Document Object >
* `type` < String >

@@ -70,0 +70,0 @@ The `templateData.placeholdersFor` function returns an array of requested placeholders

@@ -6,20 +6,6 @@ /*

export function metaTagValue (dom, name) {
if (hasMetaTag(dom, name)) {
return dom.querySelector(`meta[name="${name}"]`).content
}
}
export function hasMetaTag (dom, name) {
return dom.querySelector(`meta[name="${name}"]`) !== null
}
export function hasBackgroundArea (dom) {
let metaTagName = "jimdo.ownbg.allowed"
return (hasMetaTag(dom, metaTagName) && metaTagValue(dom, metaTagName) == "yes")
}
export function placeholdersFor (dom, type) {
let placeholders = [].slice.call(dom.querySelectorAll('var'))
return placeholders.filter((placeholder) => placeholder.textContent == type)
}
export { default as placeholdersFor } from './placeholdersFor.js'
export { default as hasBackgroundArea } from './hasBackgroundArea.js'
export { default as metaTagValue } from './metaTagValue.js'
export { default as hasMetaTag } from './hasMetaTag.js'
export { default as getVariations } from './getVariations.js'
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