1.0.0 • Published 9 years ago

hsla-regex v1.0.0

Weekly downloads
7,275,005
License
MIT
Repository
github
Last release
9 years ago

hsla-regex

Build Status

Regex for matching HSLA colors.

Installation

npm install --save hsla-regex

Usage

var hslaRegex = require('hsla-regex');

hslaRegex({ exact: true }).test('hsla(123, 45%, 67%, .8)');  // => true
hslaRegex({ exact: true }).test('foo bar');  // => false

hslaRegex({ exact: true }).exec('hsla(1, 1.111%, 1.1111%, .8)');
// => [
//  'hsla(1, 1.111%, 1.1111%, .8)',
//  '1',
//  '1.111%',
//  '1.1111%',
//  '.8'
//  index: 0,
//  input: 'hsla(1, 1.111%, 1.1111%, .8)'
// ]

'hsla(123, 45%, 67%, .8) cats and dogs'.match(hslaRegex());
// = ['hsla(123, 45%, 67%, .8)']

License

MIT

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted with <3 by John Otander (@4lpine).


This package was initially generated with yeoman and the p generator.

is-color-stopvuedragdropuploadimagescloud-archive-s3bb-chat@fundefund/funde_ckgql_din_mod@olivervorasai/slider@everything-registry/sub-chunk-1866p149-tablehue-radarcourse-vue-tpl@ct-note/table@devorso/dcountdownis-colorconvert-color-jslitepie-datepicker-gabem2m-chartjs-plugin-crosshairsticky-scroll-catchstock-ticker-react-widgetsequelcomponenttingzi-vuepressng-search-dropdownnka-gantt-task-reactvue-button-test1mggauhartestapavformlmq@southcn/ckeditor5-build-inline@percent/percent-api-hooks@stansaal/ckeditor5-custom-build@oriduk/ckeditor5-rebuild-musicanote@oriduk/ckeditor5-rebuild-oriduk@refactorpro/pixi-virtual-joystick@sak1sham/react-toc-highlight@zebracompany/f_editor@zalastax/nolb-hs@vue-helper/vue-keep-alive@superficial-ui/components@superficial-ui/core@superficial-ui/utils@tillschweneker/ckeditor5-build-strapi-wysiwyg-markdown@yak-spirit/yak-swap-uiap-vue-captcha@alta-ng-timeago/hiamtanh-altaget-css-colorsappxgenreact-lightbox-pack-18supporthot-zone-vue@contagt/metismenu@darwishdev/dash-devresponsis-gantt-task-reactcss-shorthand-expandjesusdemobase-editorchain_diggerckeditor5-custom-ksckeditor5-custom-symmetreckeditor5-strapi-msg@carhoo/widget-dealersckeditor5-build-yektackeditor5-click-virtualckeditor5-custom-build-megampireckeditor5-custom-build-for-irrosoftckeditor5-build-custom-strapickeditor5-build-classic-ticketckeditor5-build-classic-v-editckeditor-5-imi-1cssesc-wbgverify-img-codevue-compment@hazyflame/vue-jitsi-meetp147-tablep148-table@graines-digitales/nice-handsome-buttonflowable-bpmn-modeler@junvary/quasar-ui-qcascader@ikon-x/ckeditor5-custom-build-for-irrosoft@itper/css-shorthand-expand@kommunicate/kommunicate-chatbot-plugin@infinitebrahmanuniverse/nolb-hspostcss-color-invert@img-arena/img-ui-mui-theme@img-arena/ui-corepostcss-colorblind@leiyulf/gantt-task-reactgenerator-bootstrap-boilerplate-template@meysam213/react-leaflet
1.0.0

9 years ago

0.0.1

9 years ago