Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.0 KiB
27 lines
1.0 KiB
1 year ago
|
var global = require('../internals/global');
|
||
|
var DESCRIPTORS = require('../internals/descriptors');
|
||
|
var UNSUPPORTED_Y = require('../internals/regexp-sticky-helpers').UNSUPPORTED_Y;
|
||
|
var classof = require('../internals/classof-raw');
|
||
|
var defineProperty = require('../internals/object-define-property').f;
|
||
|
var getInternalState = require('../internals/internal-state').get;
|
||
|
|
||
|
var RegExpPrototype = RegExp.prototype;
|
||
|
var TypeError = global.TypeError;
|
||
|
|
||
|
// `RegExp.prototype.sticky` getter
|
||
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.sticky
|
||
|
if (DESCRIPTORS && UNSUPPORTED_Y) {
|
||
|
defineProperty(RegExpPrototype, 'sticky', {
|
||
|
configurable: true,
|
||
|
get: function () {
|
||
|
if (this === RegExpPrototype) return undefined;
|
||
|
// We can't use InternalStateModule.getterFor because
|
||
|
// we don't add metadata for regexps created by a literal.
|
||
|
if (classof(this) === 'RegExp') {
|
||
|
return !!getInternalState(this).sticky;
|
||
|
}
|
||
|
throw TypeError('Incompatible receiver, RegExp required');
|
||
|
}
|
||
|
});
|
||
|
}
|