Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 501 Bytes

allbut.md

File metadata and controls

39 lines (29 loc) · 501 Bytes

object.allbut

Removes some keys from the input object.

object.allbut: Object -> Object
  defn: Array<String> = []

This lens copies its input object but the keys specified as defn.

Example

Applying the following lens:

---
object.allbut:
  defn: [ 'age', 'hobbies' ]

to the following input:

---
firstname: 'Bernard'
company: 'Enspirit'
age: 42
hobbies: [ 'programming', 'databases' ]

will return:

---
firstname: 'Bernard'
company: 'Enspirit'