blob: ad7e7e1b462d4cf6bcc114d9c7b8118b344078b6 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
module.exports = {
toArray: toArray
};
// # toArray(obejct)
//
// Convert an object to an array.
function toArray(object) {
var keys = Object.keys(object);
var array = keys.map(toItem);
return array;
function toItem(key, index) {
return object[key];
}
}