ramda-extension
Version:
Helpful functions built on top of the mighty Ramda
28 lines (25 loc) • 478 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ramda = require("ramda");
/**
* Returns part of the object based on path.
*
* @func
* @category Object
*
* @param {any} x
* @param {Array} path
* @return {any} Slice of x
*
* @example
*
* R_.get({ foo: "bar" }, ["foo"]) // "bar"
*
* @sig a -> [a] -> a
*/
var get = (0, _ramda.flip)(_ramda.path);
var _default = get;
exports.default = _default;