Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to only match the first occurrence #24

Merged
merged 3 commits into from
Sep 18, 2018

Conversation

ZSkycat
Copy link
Contributor

@ZSkycat ZSkycat commented Jul 6, 2018

Fixes #23

index.js Outdated
@@ -1,10 +1,10 @@
'use strict';

module.exports = () => {
module.exports = onlyFirst => {
Copy link
Member

@sindresorhus sindresorhus Jul 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be an options-object. ansiRegex(true) would be a really unreadable API.

@sindresorhus sindresorhus changed the title Allowing regex to match only first (#23) Add option to only match the first occurrence Jul 6, 2018
@sindresorhus
Copy link
Member

Needs to be documented too. Should follow this format: https://github.com/sindresorhus/email-regex#api

@sindresorhus sindresorhus merged commit eac826a into chalk:master Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants