UNPKG

calculate-items

Version:

Items calculation template

3 lines (2 loc) 821 B
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],n):(e="undefined"!=typeof globalThis?globalThis:e||self)["calculate-items/members"]=n(e.lodash)}(this,(function(e){"use strict";var n=/\[([\d,\s]+)\]/,t=/\[(\s*[@a-zA-Z_][@a-zA-Z'\d_\u0430-\u044f,\s]+)\]/;return function(){function o(){}return o.getUsernames=function(n){var i=o.matchSecondUser(t,n);return(null==i?void 0:i.split(",").map(e.trim).filter(Boolean))||[]},o.getUserIndexes=function(t){var i=o.matchSecondUser(n,t);return(null==i?void 0:i.split(",").map(e.trim).filter(Boolean).map(Number))||[]},o.matchSecondUser=function(n,t){var o=null==t?void 0:t.match(n);if(e.gt(e.size(o),1))return e.nth(o,1)},o}()})); //# sourceMappingURL=members.umd.js.map