UNPKG

mongo-cursor-pagination

Version:

Make it easy to return cursor-paginated results from a Mongo collection

12 lines 401 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function getPropertyViaDotNotation(propertyName, object) { const parts = propertyName.split('.'); let prop = object; for (let i = 0; i < parts.length; i++) { prop = prop[parts[i]]; } return prop; } exports.default = getPropertyViaDotNotation; //# sourceMappingURL=getPropertyViaDotNotation.js.map