MCPcopy Create free account
hub / github.com/DevLARLEY/PlayreadyProxy2 / savePlayreadyDevice

Method savePlayreadyDevice

utils.js:236–242  ·  view source on GitHub ↗
(name, value)

Source from the content-addressed store, hash-verified

234
235export class DeviceManager {
236 static async savePlayreadyDevice(name, value) {
237 const result = await AsyncLocalStorage.getStorage(['devices']);
238 const array = result.devices === undefined ? [] : result.devices;
239 array.push(name);
240 await AsyncLocalStorage.setStorage({ devices: array });
241 await AsyncLocalStorage.setStorage({ [name]: value });
242 }
243
244 static async loadPlayreadyDevice(name) {
245 const result = await AsyncLocalStorage.getStorage([name]);

Callers 1

importDeviceMethod · 0.80

Calls 2

getStorageMethod · 0.80
setStorageMethod · 0.80

Tested by

no test coverage detected