validate-element-name
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4443