Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
move datatable to yarn
Commit Description:
move datatable to yarn
'use strict' ;
var has = require ( 'has' );
var regexExec = RegExp . prototype . exec ;
var gOPD = Object . getOwnPropertyDescriptor ;
var tryRegexExecCall = function tryRegexExec ( value ) {
try {
var lastIndex = value . lastIndex ;
value . lastIndex = 0 ; // eslint-disable-line no-param-reassign
regexExec . call ( value );
return true ;
} catch ( e ) {
return false ;
} finally {
value . lastIndex = lastIndex ; // eslint-disable-line no-param-reassign
}
};
var toStr = Object . prototype . toString ;
var regexClass = '[object RegExp]' ;
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol . toStringTag === 'symbol' ;
module . exports = function isRegex ( value ) {
if ( ! value || typeof value !== 'object' ) {
return false ;
}
if ( ! hasToStringTag ) {
return toStr . call ( value ) === regexClass ;
}
var descriptor = gOPD ( value , 'lastIndex' );
var hasLastIndexDataProperty = descriptor && has ( descriptor , 'value' );
if ( ! hasLastIndexDataProperty ) {
return false ;
}
return tryRegexExecCall ( value );
};
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings