UNPKG

@moomfe/zenjs

Version:

ZenJS 是一个高性能的 JavaScript 工具库。

11 lines (8 loc) 285 B
import RegExpProto from '../global/RegExp/prototype/index'; import defineGet from '../util/defineGet'; const rflags = /[gimsuy]*$/; if( RegExpProto.flags === undefined ){ defineGet( RegExpProto, 'flags', function(){ return this.toString().match( rflags )[0]; }); }