Skip to content

kutyel/pipeline-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipeline-experiments

Experiments with the new pipeline operator 🤓

const camelCase = str =>
  str
  |> match(/[A-Za-z]+/g)
  |> map(toLower)
  |> over(lensIndex(1), replace(/^./g, toUpper))
  |> join('')

const test = [
  'foo-bar',
  'foo_bar',
  'Foo-Bar',
  '--foo.bar',
  '__foo__bar__',
  'foo bar'
]

test |> map(camelCase) |> all(equals('fooBar')) |> console.log // true!!!

Releases

No releases published

Packages

No packages published