
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
validate-element-name
Advanced tools
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.
$ npm install --save validate-element-name
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.
$ npm install --global validate-element-name
$ validate-element-name --help
Usage
validate-element-name <element-name>
Example
validate-element-name s-slider
✔︎ Valid element name.
MIT © Sindre Sorhus
FAQs
Validate the name of a custom element
The npm package validate-element-name receives a total of 9,243 weekly downloads. As such, validate-element-name popularity was classified as popular.
We found that validate-element-name demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.