From 78a6beb8f452c3eb1f36371b610428da3dc26aa3 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 13 May 2017 23:38:25 +0300 Subject: [PATCH] added a .run(..) method... Signed-off-by: Alex A. Naanou --- actions.js | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/actions.js b/actions.js index b0d795e..fc24dc6 100755 --- a/actions.js +++ b/actions.js @@ -1378,6 +1378,17 @@ module.MetaActions = { }) .unique() }, + + // Run a function in the context of the action set... + // + // This is here simply as a utility function, to enable running code + // in a concatinative manner without interruption... + run: function(func){ + var res = func ? func.call(this) : undefined + return res === undefined ? this : res + }, + + // doc generators... // // XXX would be nice to make these prop of the action itself but I diff --git a/package.json b/package.json index 3695987..ba317bd 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "3.1.2", + "version": "3.2.0", "description": "", "main": "actions.js", "scripts": {