question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactor goods objects into arrays

See original GitHub issue

goodsAndServices.js has a goods value for every entry, which should be refactored into an array.

e.g.

goods: {
        'short boots': {
          cost: 10,
          description: 'A pair of barely ankle height boots made of some kind of leather'
        },

should become

goods: [
        {
          summary: 'short boots',
          cost: 10,
          description: 'A pair of barely ankle height boots made of some kind of leather'
        },

This would involve a minor refactoring of the <<goods>> widget located in Widgets.twee.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rycegcommented, Oct 14, 2020

Please do @alcar!

0reactions
alcarcommented, Oct 14, 2020

Sorry @femakin, I’m already working on it 🙁

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refactor array of objects - javascript - Stack Overflow
The below code works fine but I need a more refactored shorter format of what I am trying to achieve. var res =...
Read more >
Refactor: Parallel Arrays to Array of Objects - XP123
Starting Point: Parallel Arrays. I started with a QuerySpec object something like this: · First Move: New Class. 1. · Update Class Before...
Read more >
JavaScript Refactoring Tips — Arrays, Class Names, and ...
To check if a class name exists in a DOM element object, we can use the contains method. To use it, we can...
Read more >
Replace Array with Object - Refactoring.Guru
Problem: You have an array that contains various types of data. Solution: Replace the array with an object that will have separate fields...
Read more >
Refactoring: Extracting Data Objects - Qafoo GmbH
Extracting data objects from your code will make it easier to read and write, easier to test and more forward compatible.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found