'use strict';

// MODULES //

var getKeys = require( 'object-keys' ).shim();


// MAIN //

/**
* Returns an array of unique values.
*
* @private
* @param {Array} arr - input array
* @returns {Array} array with unique values
*/
function unique( arr ) {
	var obj;
	var i;
	obj = {};
	for ( i = 0; i < arr.length; i++ ) {
		obj[ arr[i] ] = true;
	}
	return getKeys( obj );
} // end FUNCTION unique()


// EXPORTS //

module.exports = unique;

'use strict';

// MODULES //

var getKeys = require( 'object-keys' ).shim();


// MAIN //

/**
* Returns an array of unique values.
*
* @private
* @param {StringArray} arr - input array
* @returns {StringArray} array with unique values
*/
function unique( arr ) {
	var obj;
	var i;
	obj = {};
	for ( i = 0; i < arr.length; i++ ) {
		obj[ arr[i] ] = true;
	}
	return getKeys( obj );
} // end FUNCTION unique()


// EXPORTS //

module.exports = unique;

Make explicit that function works only for strings
Make explicit that function works only for strings
