-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Added feature isHSL #1159
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
Merged
Merged
Added feature isHSL #1159
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c38fdc3
isHSL WIP
ayala-io 067f03c
Added another valid test case.
ayala-io 6783382
Updated readme to include isHSL.
ayala-io be3ea74
Merge remote-tracking branch 'upstream/master' into add-feature-isHSL
ayala-io 0a71904
dc0b34b
d2ea634
Merge remote-tracking branch 'upstream/master' into add-feature-isHSL
ayala-io cd611f2
More comprehensive HSL check WIP
ayala-io 4315d00
WIP, new tests are needed.
ayala-io 6e0b331
Added ezkemboi test cases
ayala-io c90164a
Added ezkemboi test cases
ayala-io 5b5becc
Added ezkemboi test cases
ayala-io 71966a4
isHSL WIP
ayala-io b7f2c19
Added another valid test case.
ayala-io 42d4342
Updated readme to include isHSL.
ayala-io e72967b
395a28e
c9b6a98
More comprehensive HSL check WIP
ayala-io e873c8d
WIP, new tests are needed.
ayala-io 2c95498
Added ezkemboi test cases
ayala-io b5e1e9d
Added ezkemboi test cases
ayala-io e12af35
Added ezkemboi test cases
ayala-io cd0ec4e
cfcfee6
Merge remote-tracking branch 'origin/add-feature-isHSL' into add-feat…
ayala-io 8d7c7a8
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import assertString from './util/assertString'; | ||
|
||
|
||
const hslcomma = /^(hsl)a?\(\s*((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn|\s*)(\s*,\s*(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s*(,\s*((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s*)?\)$/i; | ||
const hslspace = /^(hsl)a?\(\s*((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn|\s)(\s*(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s*(\/\s*((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s*)?\)$/i; | ||
|
||
export default function isHSL(str) { | ||
assertString(str); | ||
return hslcomma.test(str) || hslspace.test(str); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.