-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsum.min.js
1 lines (1 loc) · 1.45 KB
/
sum.min.js
1
(function(e){if("function"==typeof bootstrap)bootstrap("sum",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeSum=e}else"undefined"!=typeof window?window.sum=e():global.sum=e()})(function(){var define,ses,bootstrap,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){module.exports=sum;var selectn=require("selectn");var toString={}.toString;function sum(list,fun){fun=toString.call(fun)=="[object String]"?selectn(fun):fun;end=list.length;sum=-0;idx=-1;while(++idx<end){sum+=typeof fun=="function"?fun(list[idx])*1e3:list[idx]*1e3}return sum&&sum/1e3}},{selectn:2}],2:[function(require,module,exports){module.exports=selectn;function selectn(query){var parts;query=query.replace(/\[(\d+)\]/g,".$1");parts=query.split(".");function accessor(object){var ref=object||(1,eval)("this");var len=parts.length;var idx=0;for(;idx<len;idx+=1){if(ref)ref=ref[parts[idx]]}return ref}return arguments.length>1?accessor(arguments[1]):accessor}},{}]},{},[1])(1)});