function resolveData(dataPromise, resolver, wait) {
			if (wait === true) {
				dataPromise.then(
					function (data) {
						resolver.resolve(data);
					},
					function (err) {
						resolver.reject(err);
					}
				);
			}
			else {
				resolver.resolve(dataPromise);
			}
		}
/**
		 * If wait === true, waits for dataPromise to complete and resolves
		 * the reference to the resulting concrete data.  If wait !== true,
		 * resolves the reference to dataPromise.
		 *
		 * @param dataPromise
		 * @param resolver
		 * @param wait
		 */
If wait === true, waits for dataPromise to complete and resolves
the reference to the resulting concrete data.  If wait !== true,
resolves the reference to dataPromise.


If wait === true waits for dataPromise to complete and resolves the reference to the resulting concrete data . If wait ! == true resolves the reference to dataPromise .
function resolveData(dataPromise, resolver, wait) {
			if (wait === true) {
				dataPromise.then(
					function (data) {
						resolver.resolve(data);
					},
					function (err) {
						resolver.reject(err);
					}
				);
			}
			else {
				resolver.resolve(dataPromise);
			}
		}
function resolveData ( dataPromise , resolver , wait ) { if ( wait === true ) { dataPromise . then ( function ( data ) { resolver . resolve ( data ) ; } , function ( err ) { resolver . reject ( err ) ; } ) ; } else { resolver . resolve ( dataPromise ) ; } }
If wait === true, waits for dataPromise to complete and resolves
 the reference to the resulting concrete data.
If wait === true waits for dataPromise to complete and resolves the reference to the resulting concrete data .