1.0.0 • Published 10 years ago

hsl-regex v1.0.0

Weekly downloads
7,274,537
License
MIT
Repository
github
Last release
10 years ago

hsl-regex

Build Status

Regex for matching HSL colors.

Installation

npm install --save hsl-regex

Usage

var hslRegex = require('hsl-regex');

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

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

'hsl(123, 45%, 67%) cats and dogs'.match(hslRegex());
// = ['hsl(123, 45%, 67%)']

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-tablevue-button-test1sticky-scroll-catchtestapavue-compmentvs-tree-plus@ct-note/table@percent/percent-api-hooksgenerator-bootstrap-boilerplate-templatejesusdemois-colorchain_diggerstock-ticker-react-widgettingzi-vuepress@alta-ng-timeago/hiamtanh-alta@carhoo/widget-dealers@devorso/dcountdown@darwishdev/dash-dev@contagt/metismenuverify-img-codevformlmq@hazyflame/vue-jitsi-meet@graines-digitales/nice-handsome-button@infinitebrahmanuniverse/nolb-hs@leiyulf/gantt-task-react@itper/css-shorthand-expand@meysam213/react-leaflet@kommunicate/kommunicate-chatbot-plugin@ikon-x/ckeditor5-custom-build-for-irrosoft@img-arena/img-ui-mui-theme@img-arena/ui-core@junvary/quasar-ui-qcascader@sak1sham/react-toc-highlight@refactorpro/pixi-virtual-joystick@oriduk/ckeditor5-rebuild-oriduk@oriduk/ckeditor5-rebuild-musicanote@southcn/ckeditor5-build-inline@stansaal/ckeditor5-custom-buildmggauharp147-tablep148-tablereact-lightbox-pack-18supportreact-gantt-chart7sequelcomponentnka-gantt-task-reactng-search-dropdownpostcss-color-invertpostcss-colorblindresponsis-gantt-task-reacthue-radarhot-zone-vuelitepie-datepicker-gabem2m-chartjs-plugin-crosshair@vue-helper/vue-keep-alive@tillschweneker/ckeditor5-build-strapi-wysiwyg-markdown@yak-spirit/yak-swap-ui@zalastax/nolb-hs@zebracompany/f_editor@superficial-ui/utils@superficial-ui/components@superficial-ui/coreap-vue-captchaappxgenckeditor-5-imi-1ckeditor5-build-custom-strapickeditor5-custom-build-for-irrosoftckeditor5-strapi-msgckeditor5-custom-ksckeditor5-custom-symmetreckeditor5-custom-build-megampireckeditor5-build-yektackeditor5-click-virtualckeditor5-build-classic-ticketckeditor5-build-classic-v-editcourse-vue-tplconvert-color-jscss-shorthand-expandcssesc-wbgbase-editorflowable-bpmn-modelerget-css-colors
1.0.0

10 years ago

0.0.1

10 years ago