blob: 44d2d015420d737d42a0c64acade73181cd784ec [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 = setMercuryArray;
// TODO(alexfandrianto): observ-array's set() method works properly in 3.0.0,
// but mercury doesn't depend on that version yet. Use set() when it is.
function setMercuryArray(o, newArray) {
o.splice(0, o.getLength());
newArray.forEach(function(entry) {
o.push(entry);
});
}