* chore: 🤖 upgrade ember-data to v5.3.11 * Add missing copyright headers * refactor: 💡 remove comment * chore: 🤖 update yarn.lock due to merge conflict ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * fix: 🐛 undo ember-source upgrade (should be upgraded w/ ember) ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * chore: 🤖 move dep to devDeps & resolve test-helper version ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * fix: 🐛 unique record id error bug fix using store.push ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 cleanup ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * Delete old deprecation initializer (#2748) * refactor: 💡 import from'ember-data/store' ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 clean up comments ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 * refactor: 💡 remove compatWith comment ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-16544 --------- Co-authored-by: Carlos Alcaide Corvo <ccorvo@hashicorp.com>
24 lines
563 B
JavaScript
24 lines
563 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
export default class AccountValueMapArrayTransform {
|
|
deserialize(serialized) {
|
|
const accountValues = serialized || [];
|
|
return accountValues.map((accountValueString) => ({
|
|
key: accountValueString.split('=')[0],
|
|
value: accountValueString.split('=')[1],
|
|
}));
|
|
}
|
|
|
|
serialize(deserialized) {
|
|
const accountValues = deserialized || [];
|
|
return accountValues.map(({ key, value }) => `${key}=${value}`);
|
|
}
|
|
|
|
static create() {
|
|
return new this();
|
|
}
|
|
}
|