Skip to content

zhentian-wan/ramda-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

function

list

  • partition -- filter, reject, partition, different ways to davide an array
  • chain -- flatMap, get unique array from a nested array, also an example how to use R.tap
  • unfold -- generate list of array
  • fromPairs -- from [['a', 'b'], ['c', 'd']] to {a: b, c: d}
  • countBy -- showing countBy and invert
  • allPass -- showing all pass for condition check
  • zip -- zip, zipObj to convert list to object style
  • without -- without, remove items from array

logic

object

  • evolve -- showing how to update object's props values in a more understandable way
  • lens & lensProp -- showing how to update object props by using lens or lensProp
  • path -- Get nested object value
  • project -- a clean way to replace R.map(R.pick['prop1', 'prop2'])
  • where -- combine where with filter, to make it really convenient writing complex predicts function
  • pick & omit -- showing how to get object by props by condition, difference between R.pickAll (return objects) & R.prop (return value)
  • toPairs -- showing how to convert an object to query string using toPairs / also see fromPairs

Relation

  • sortWith -- showing the difference between sort, sortWith, sortBy

Releases

No releases published

Packages

No packages published