Has anyone had any luck using `Object.create` for reconstituting class instances from the plain data objects that IndexDB gives back to you?

Like, from the docs it feels like I should be able to call `Object.create(MyCoolClass, dataFromIDB)`, but that gives an odd error, complaining about one of the root props in the data object.

The bottom line in this MDN example is basically exactly what I am trying to do, so I assume it might work?

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#using_propertiesobject_argument_with_object.create

#JavaScript #IndexDB #WebDev

Object.create() - JavaScript | MDN

The Object.create() static method creates a new object, using an existing object as the prototype of the newly created object.

MDN Web Docs
Friday Links #38 — Modern JavaScript, AI Coding Tools & Web Releases https://jsdevspace.substack.com/p/friday-links-38-modern-javascript #javascript #typescript #frontend #backend
Friday Links #38 — Modern JavaScript, AI Coding Tools & Web Releases

The latest JavaScript ecosystem updates, AI developer workflows, framework releases, tooling launches, and frontend engineering news worth your attention.

JavaScript Development Substack
The world of JavaScript dependency management is like a coffee shop. You've been told flat white is the latest rave and by the time you reach the queue to ask for it, the trend has shifted, and the new hottest thing is blue hazed matcha latte with peanut butter and cucumber.
#JavaScript #Bun #Rust #rustlang 🦀

Креативное программирование: визуализация звука

Привет, я Игорь Аникин, Frontend разработчик RUTUBE TECH. Медиадизайнер, специализируюсь на компьютерной графике. Увлекаюсь программированием более 15 лет. Это небольшой мастер-класс, как визуализировать звук двумя способами. Текст подойдёт любому читателю, которому интересна выразительная часть цифрового мира.

https://habr.com/ru/companies/habr_rutube/articles/1028574/

#визуализация #звук #webaudio #javascript #touchdesigner

Креативное программирование: визуализация звука

Привет, я Игорь Аникин, Frontend разработчик RUTUBE TECH. Медиадизайнер, специализируюсь на компьютерной графике. Увлекаюсь программированием более 15 лет. Веду Telegram-блог про новые медиа . Это...

Хабр
×
How JavaScript call, apply, and bind Actually Work https://jsdev.space/howto/call-apply-bind/ #javascript