app/webroot/assets/global/plugins/nouislider/jquery.nouislider.js
// Test all developer settings and parse to assumption-safe values.
Test all developer settings and parse to assumption-safe values.
Test all developer settings and parse to assumption - safe values .
function test ( options, sliders ){
		var parsed = {
			 xPct: []
			,xVal: []
			,xSteps: [ false ]
			,margin: 0
		}, tests;
		tests = {
			'step': { r: false, t: testStep },
			'range': { r: true, t: testRange },
			'start': { r: true, t: testStart },
			'snap': { r: false, t: testSnap },
			'connect': { r: true, t: testConnect },
			'orientation': { r: false, t: testOrientation },
			'margin': { r: false, t: testMargin },
			'direction': { r: true, t: testDirection },
			'behaviour': { r: true, t: testBehaviour },
			'serialization': { r: true, t: testSerialization }
		};
		options = $.extend({
			'connect': false,
			'direction': 'ltr',
			'behaviour': 'tap',
			'orientation': 'horizontal'
		}, options);
		options['serialization'] = $.extend({
			 'lower': []
			,'upper': []
			,'format': {}
		}, options['serialization']);
		$.each( tests, function( name, test ){
			if ( options[name] === undefined ) {
				if ( test.r ) {
					throw new Error("noUiSlider: '" + name + "' is required.");
				}
				return true;
			}
			test.t( parsed, options[name], sliders );
		});
		parsed.style = parsed.ort ? 'top' : 'left';
		return parsed;
	}
function test ( options , sliders ) { var parsed = { xPct : [ ] , xVal : [ ] , xSteps : [ false ] , margin : 0 } , tests ; tests = { 'step' : { r : false , t : testStep } , 'range' : { r : true , t : testRange } , 'start' : { r : true , t : testStart } , 'snap' : { r : false , t : testSnap } , 'connect' : { r : true , t : testConnect } , 'orientation' : { r : false , t : testOrientation } , 'margin' : { r : false , t : testMargin } , 'direction' : { r : true , t : testDirection } , 'behaviour' : { r : true , t : testBehaviour } , 'serialization' : { r : true , t : testSerialization } } ; options = $ . extend ( { 'connect' : false , 'direction' : 'ltr' , 'behaviour' : 'tap' , 'orientation' : 'horizontal' } , options ) ; options [ 'serialization' ] = $ . extend ( { 'lower' : [ ] , 'upper' : [ ] , 'format' : { } } , options [ 'serialization' ] ) ; $ . each ( tests , function ( name , test ) { if ( options [ name ] === undefined ) { if ( test . r ) { throw new Error ( "noUiSlider: '" + name + "' is required." ) ; } return true ; } test . t ( parsed , options [ name ] , sliders ) ; } ) ; parsed . style = parsed . ort ? 'top' : 'left' ; return parsed ; }
Test all developer settings and parse to assumption-safe values.
Test all developer settings and parse to assumption - safe values .
/*	Every input option is tested and parsed. This'll prevent
		endless validation in internal methods. These tests are
		structured with an item for every option available. An
		option can be marked as required by setting the 'r' flag.
		The testing function is provided with three arguments:
			- The provided value for the option;
			- A reference to the options object;
			- The name for the option;

		The testing function returns false when an error is detected,
		or true when everything is OK. It can also modify the option
		object, to make sure all values can be correctly looped elsewhere. */ // Set defaults where applicable. // Make sure the test for serialization runs. // Run all options through a testing mechanism to ensure correct // input. It should be noted that options might get modified to // be handled properly. E.g. wrapping integers in arrays. // Pre-define the styles.