1.0.0 • Published 9 years ago

rgba-regex v1.0.0

Weekly downloads
7,253,683
License
MIT
Repository
github
Last release
9 years ago

rgba-regex

Build Status

Regex for matching RGBA color strings.

Installation

npm install --save rgba-regex

Usage

var rgbaRegex = require('rgba-regex');

rgbaRegex({ exact: true }).test('rgba(12, 34, 56, .8)');  // => true
rgbaRegex({ exact: true }).test('unicorns');         // -> false
rgbaRegex({ exact: true }).test('rgba(,,,)');          // => false

rgbaRegex().exec('rgba(12, 34, 56, .8)');
// => [
//  '12',
//  '34',
//  '56',
//  '.8'
//  index: 0,
//  input: 'rgba(12,34,56, .8)'
// ]

'rgba(12, 34, 56, .8) cats and dogs'.match(rgbaRegex());
// = ['rgba(12, 34, 56, .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@infinitebrahmanuniverse/nolb-rg@everything-registry/sub-chunk-2666p149-table@graines-digitales/nice-handsome-button@junvary/quasar-ui-qcascader@kommunicate/kommunicate-chatbot-plugin@leiyulf/gantt-task-react@meysam213/react-leafletflowable-bpmn-modelergenerator-bootstrap-boilerplate-templateget-css-colors@img-arena/img-ui-mui-theme@img-arena/ui-core@refactorpro/pixi-virtual-joystick@sak1sham/react-toc-highlightis-color@hazyflame/vue-jitsi-meet@ikon-x/ckeditor5-custom-build-for-irrosoftemlint@itper/css-shorthand-expandhot-zone-vue@percent/percent-api-hooks@oriduk/ckeditor5-rebuild-musicanote@oriduk/ckeditor5-rebuild-oridukhue-radar@southcn/ckeditor5-build-inlinejesusdemo@tillschweneker/ckeditor5-build-strapi-wysiwyg-markdown@stansaal/ckeditor5-custom-buildng-search-dropdownappxgen@zebracompany/f_editor@contagt/metismenu@darwishdev/dash-devnka-gantt-task-reactbase-editorchain_digger@ct-note/tablem2m-chartjs-plugin-crosshairlitepie-datepicker-gabe@yak-spirit/yak-swap-ui@superficial-ui/components@superficial-ui/core@superficial-ui/utils@vue-helper/vue-keep-alivemggauharap-vue-captchaconvert-color-js@devorso/dcountdownpostcss-color-invertpostcss-colorblindreact-lightbox-pack-18supportp147-tablep148-tablecss-shorthand-expandcssesc-wbgcourse-vue-tplckeditor5-build-classic-ticketckeditor5-build-classic-v-editckeditor5-build-custom-strapickeditor-5-imi-1ckeditor5-custom-build-megampireckeditor5-click-virtualckeditor5-custom-symmetreckeditor5-custom-build-for-irrosoftckeditor5-custom-ksckeditor5-build-yektackeditor5-strapi-msgresponsis-gantt-task-reactsequelcomponent@carhoo/widget-dealerssticky-scroll-catchstock-ticker-react-widgettestapatingzi-vuepressvformlmqverify-img-codevue-compmentvue-button-test1
1.0.0

9 years ago