Version 1
[yaffs-website] / node_modules / core-js / library / modules / _flags.js
diff --git a/node_modules/core-js/library/modules/_flags.js b/node_modules/core-js/library/modules/_flags.js
new file mode 100644 (file)
index 0000000..054f908
--- /dev/null
@@ -0,0 +1,13 @@
+'use strict';
+// 21.2.5.3 get RegExp.prototype.flags
+var anObject = require('./_an-object');
+module.exports = function(){
+  var that   = anObject(this)
+    , result = '';
+  if(that.global)     result += 'g';
+  if(that.ignoreCase) result += 'i';
+  if(that.multiline)  result += 'm';
+  if(that.unicode)    result += 'u';
+  if(that.sticky)     result += 'y';
+  return result;
+};
\ No newline at end of file