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

validate-element-name

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validate-element-name - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

6

index.js

@@ -55,2 +55,6 @@ 'use strict';

if (/^[^a-z]/i.test(name)) {
return 'This element name is only valid in XHTML, not in HTML. First character should be in the range a-z.';
}
if (/-$/.test(name)) {

@@ -60,3 +64,3 @@ return 'Custom element names should not end with an hyphen.';

if (/[^\x20-\x7E]+/.test(name)) {
if (/[^\x20-\x7E]/.test(name)) {
return 'Custom element names should not contain non-ASCII characters.';

@@ -63,0 +67,0 @@ }

2

package.json
{
"name": "validate-element-name",
"version": "0.4.0",
"version": "0.5.0",
"description": "Validate the name of a custom element",

@@ -5,0 +5,0 @@ "license": "MIT",

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