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.3.0 to 0.3.1

2

index.js

@@ -45,3 +45,3 @@ 'use strict';

// http://www.w3.org/TR/custom-elements/#concepts
if (!ncname.test(name.replace(/-/g, ''))) {
if (!ncname.test(name)) {
throw new Error('Invalid element name.');

@@ -48,0 +48,0 @@ }

{
"name": "validate-element-name",
"version": "0.3.0",
"version": "0.3.1",
"description": "Validate the name of a custom element",

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

@@ -6,3 +6,3 @@ # validate-element-name [![Build Status](https://travis-ci.org/sindresorhus/validate-element-name.svg?branch=master)](https://travis-ci.org/sindresorhus/validate-element-name)

Custom element names should start with `a-z` and contain `a-z` and at least one `-` with optionally `0-9`.
[You should not use the `x-` or `polymer-` prefix](http://webcomponents.github.io/articles/how-should-i-name-my-element/).
You should not use the [`x-`, `polymer-`](http://webcomponents.github.io/articles/how-should-i-name-my-element/), [`ng-`](http://docs.angularjs.org/guide/directive#creating-directives) prefixes.

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