UNPKG

432 BJavaScriptView Raw
1
2/**
3 this view is wrapped in a function so it can be re-used for
4 all numerical sorting scripts.
5**/
6
7module.exports = function( script_name ){
8 return function( vs ){
9
10 // validate required params
11 if( !script_name ){
12 return null;
13 }
14
15 // groovy script
16 var view = {
17 '_script': {
18 'file': script_name,
19 'type': 'number',
20 'order': 'desc'
21 }
22 };
23
24 return view;
25 };
26};