Coder Social home page Coder Social logo

Comments (8)

ckniffen avatar ckniffen commented on September 22, 2024 1

@develoQ I am up for removing lodash all together if the methods used can be done in modern js.

from xrpl.js.

ckniffen avatar ckniffen commented on September 22, 2024 1

Done as part of 3.0

from xrpl.js.

WietseWind avatar WietseWind commented on September 22, 2024

@ckniffen Exactly, most things are very easy with some map/reduce/filter/... these days.

from xrpl.js.

mvadari avatar mvadari commented on September 22, 2024

I believe I tried to remove as much lodash as possible at some point, but in some places there were really nice functions like groupby and omitby that were hard to replace.

from xrpl.js.

WietseWind avatar WietseWind commented on September 22, 2024

groupby would be very easy with a reduce fn?

Ugly piece of code, idea is clear, reducer could be a more generic fn of course.

const people = [
  { name: 'Nienke', gender: 'F' },
  { name: 'Wietse', gender: 'M' },
  { name: 'Arwen', gender: 'F' },
  { name: 'Quinn', gender: 'M' },
]

const sortedPeople = people.reduce((a, b) => {
  if (!a[b.gender]) {
    Object.assign(a, { [b.gender]: [] })
  }
  a[b.gender].push(b)
  return a
}, {})

image

from xrpl.js.

aruns05 avatar aruns05 commented on September 22, 2024

@develoQ @intelliot is it done. I am keen in learning xrp and want to pick this

from xrpl.js.

ckniffen avatar ckniffen commented on September 22, 2024

@aruns05 when working on this the solution should reduce the webpack bundle size.

from xrpl.js.

ckniffen avatar ckniffen commented on September 22, 2024

@aruns05 I went ahead and did this as part of our effort to reduce the bundle size of xrpl.js. Let me know if I missed anything in #2378.

There will be more PRs to reduce size in the next few weeks.

from xrpl.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.