diff --git a/resources/rapydscript/compiler.js b/resources/rapydscript/compiler.js index 84bd764fa6..9ec823eb08 100644 --- a/resources/rapydscript/compiler.js +++ b/resources/rapydscript/compiler.js @@ -5955,6 +5955,6 @@ function OutputStream(options) { }); })(); -rs_baselib_pyj = "\"\"\"\n**********************************************************************\n\n A RapydScript to JavaScript compiler.\n https://github.com/atsepkov/RapydScript2\n\n -------------------------------- (C) ---------------------------------\n\n Author: Alexander Tsepkov\n \n http://www.pyjeon.com\n\n Distributed under Apache 2.0 license:\n Copyright 2013 (c) Alexander Tsepkov \n\n RapydScript source code is originally based on UglifyJS2 (covered\n by BSD license). UglifyJS2 was written by Mihai Bazon\n , who is its respective copyright holder.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n * Redistributions of source code must retain the above\n copyright notice, this list of conditions and the following\n disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials\n provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER \u201cAS IS\u201d AND ANY\n EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\n TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\n THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.\n\n **********************************************************************\n\"\"\"\n\"use strict\"\n\n{\n\"abs\": def abs(n):\n return Math.abs(n)\n,\n\"bind\": def _$rapyd$_bind(fn, thisArg):\n if fn.orig: fn = fn.orig\n if thisArg == False: return fn\n ret = def():\n return fn.apply(thisArg, arguments)\n ret.orig = fn\n return ret\n,\n\"rebind_all\": def _$rapyd$_rebindAll(thisArg, rebind):\n if JS('typeof rebind') == \"undefined\": rebind = True\n for JS('var p in thisArg'):\n if thisArg[p] and thisArg[p].orig:\n if rebind: thisArg[p] = _$rapyd$_bind(thisArg[p], thisArg)\n else: thisArg[p] = thisArg[p].orig\n,\n\"dir\": def dir(item):\n # TODO: this isn't really representative of real Python's dir(), nor is it\n # an intuitive replacement for \"for ... in\" loop, need to update this logic\n # and introduce a different way of achieving \"for ... in\"\n arr = []\n for JS('var i in item'): arr.push(i)\n return arr\n,\n\"enumerate\": def enumerate(item):\n arr = []\n for JS('var i=0;i