Package Exports
- validate-element-name
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (validate-element-name) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
validate-element-name 
Validate the name of a custom element
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-
, polymer-
, ng-
prefixes.
Install
$ npm install --save validate-element-name
Usage
var validate = require('validate-element-name');
validate('unicorn');
//=> {isValid: false, message: 'Custom element names must contain a hyphen. Example: unicorn-cake'}
See cli.js for real-world usage.
CLI
You can also use it as a CLI app by installing it globally:
$ npm install --global validate-element-name
Usage
$ validate-element-name --help
Usage
$ validate-element-name <element-name>
Example
$ validate-element-name s-slider
👍 Valid element name