diff options
Diffstat (limited to 'node_modules/locutus/php/array/array_values.js')
-rw-r--r-- | node_modules/locutus/php/array/array_values.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/node_modules/locutus/php/array/array_values.js b/node_modules/locutus/php/array/array_values.js new file mode 100644 index 0000000..119cd0d --- /dev/null +++ b/node_modules/locutus/php/array/array_values.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = function array_values(input) { + // eslint-disable-line camelcase + // discuss at: http://locutus.io/php/array_values/ + // original by: Kevin van Zonneveld (http://kvz.io) + // improved by: Brett Zamir (http://brett-zamir.me) + // example 1: array_values( {firstname: 'Kevin', surname: 'van Zonneveld'} ) + // returns 1: [ 'Kevin', 'van Zonneveld' ] + + var tmpArr = []; + var key = ''; + + for (key in input) { + tmpArr[tmpArr.length] = input[key]; + } + + return tmpArr; +}; +//# sourceMappingURL=array_values.js.map
\ No newline at end of file |