aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/core/functional/relation.lua
blob: d9786a6aa7e796d689b3f97df8ad15b85fc5e669 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local fun = require "nvim-lsp-installer.core.functional.function"

local _ = {}

_.equals = fun.curryN(function(expected, value)
    return value == expected
end, 2)

_.prop_eq = fun.curryN(function(property, value, tbl)
    return tbl[property] == value
end, 3)

_.prop_satisfies = fun.curryN(function(predicate, property, tbl)
    return predicate(tbl[property])
end, 3)

return _