npm

regex-theme-color

0.1.1 • Public • Published

NPM version Build Status Dependency Status

Regex for checking HTML has a valid theme-color meta tag.

Install

$ npm install --save regex-theme-color

Usage

var regexThemeColor = require('regex-theme-color');

regexThemeColor().test('<meta name="theme-color" content="#3372DF">');
//=> true

regexThemeColor().test('<meta   name="theme-color" content="#3372DF" >');
//=> true

regexThemeColor().test('<meta   name="theme-color" content=\'#3372DF\' >');
//=> true

regexThemeColor().test('<meta name="">');
//=> false

License

MIT © Addy Osmani

Package Sidebar

Install

npm i regex-theme-color

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • addyosmani