Share your code. Components are building blocks, you are the architect.

utils/match
v1.1.0
1.1.0
1.0.0
MIT
PUBLIC
3
1     DEPENDENCIES
Build: fail
BuildFail
Build Status: fail
Tests a regular expression against a String

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/match in your project
npm i @bit/bit.ramda.utils.match
Copied

match (rx:RegExp, str:String) : Array

Tests a regular expression against a String. Note that this function will return an empty array when there are no matches. This differs from String.prototype.match which returns null when there are no matches.

Example

R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na']
     R.match(/a/, 'b'); //=> []
     R.match(/a/, null); //=> TypeError: null does not have a method named "match"

Arguments

rx: RegExp

A regular expression.

str: String

The string to match against

Returns

Array

The list of matches or empty array.