From 799445c745747e1443d5e93d29d81aafbe2c4085 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 8 Feb 2015 20:21:45 +1100 Subject: [PATCH] add property method assignment wrapper generator template --- .../property-method-assignment-wrapper-generator.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/6to5/transformation/templates/property-method-assignment-wrapper-generator.js diff --git a/lib/6to5/transformation/templates/property-method-assignment-wrapper-generator.js b/lib/6to5/transformation/templates/property-method-assignment-wrapper-generator.js new file mode 100644 index 0000000000..fb59a89ae9 --- /dev/null +++ b/lib/6to5/transformation/templates/property-method-assignment-wrapper-generator.js @@ -0,0 +1,11 @@ +(function (FUNCTION_KEY) { + var WRAPPER_KEY = function* FUNCTION_ID() { + return yield* FUNCTION_KEY.apply(this, arguments); + }; + + WRAPPER_KEY.toString = function () { + return FUNCTION_KEY.toString(); + }; + + return WRAPPER_KEY; +})(FUNCTION)