@cloudcmd/create-element
Advanced tools
@@ -34,6 +34,8 @@ 'use strict'; | ||
| parent = _options$parent === void 0 ? document.body : _options$parent, | ||
| restOptions = _objectWithoutProperties(options, ["dataName", "notAppend", "parent"]); | ||
| _options$uniq = options.uniq, | ||
| uniq = _options$uniq === void 0 ? true : _options$uniq, | ||
| restOptions = _objectWithoutProperties(options, ["dataName", "notAppend", "parent", "uniq"]); | ||
| var elFound = isElementPresent(dataName); | ||
| if (elFound) return elFound; | ||
| if (uniq && elFound) return elFound; | ||
| var el = document.createElement(name); | ||
@@ -40,0 +42,0 @@ if (dataName) el.dataset.name = dataName; |
+1
-1
| { | ||
| "name": "@cloudcmd/create-element", | ||
| "version": "1.0.1", | ||
| "version": "1.1.0", | ||
| "description": "create dom element", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/cloudcmd/create-element", |
+1
-0
@@ -23,2 +23,3 @@ # create-element [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage][CoverageIMGURL]][CoverageURL] | ||
| parent: document.body, // default | ||
| uniq: true, // default | ||
| innerHTML: '<span></span>', | ||
@@ -25,0 +26,0 @@ className: 'abc', |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
7597
2.86%44
4.76%52
1.96%0
-100%