This app provides monitoring and information features for the common freifunk user and the technical stuff of a freifunk community.
Code base is taken from a TUM Practical Course project and added here to see if Freifunk Altdorf can use it.
https://www.freifunk-altdorf.de
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.
38 lines
1.4 KiB
38 lines
1.4 KiB
var $ = require('./$') |
|
, global = require('./$.global') |
|
, isRegExp = require('./$.is-regexp') |
|
, $flags = require('./$.flags') |
|
, $RegExp = global.RegExp |
|
, Base = $RegExp |
|
, proto = $RegExp.prototype |
|
, re1 = /a/g |
|
, re2 = /a/g |
|
// "new" creates a new object, old webkit buggy here |
|
, CORRECT_NEW = new $RegExp(re1) !== re1; |
|
|
|
if(require('./$.descriptors') && (!CORRECT_NEW || require('./$.fails')(function(){ |
|
re2[require('./$.wks')('match')] = false; |
|
// RegExp constructor can alter flags and IsRegExp works correct with @@match |
|
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; |
|
}))){ |
|
$RegExp = function RegExp(p, f){ |
|
var piRE = isRegExp(p) |
|
, fiU = f === undefined; |
|
return !(this instanceof $RegExp) && piRE && p.constructor === $RegExp && fiU ? p |
|
: CORRECT_NEW |
|
? new Base(piRE && !fiU ? p.source : p, f) |
|
: Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f); |
|
}; |
|
$.each.call($.getNames(Base), function(key){ |
|
key in $RegExp || $.setDesc($RegExp, key, { |
|
configurable: true, |
|
get: function(){ return Base[key]; }, |
|
set: function(it){ Base[key] = it; } |
|
}); |
|
}); |
|
proto.constructor = $RegExp; |
|
$RegExp.prototype = proto; |
|
require('./$.redefine')(global, 'RegExp', $RegExp); |
|
} |
|
|
|
require('./$.set-species')('RegExp'); |