UNPKG

keystone

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

13 lines (11 loc) 290 B
/** * Checks to see if a field path matches a currently unmapped path, and * if so, adds a mapping for it. */ function automap (field) { if ((field.path in this.mappings) && !this.mappings[field.path]) { this.map(field.path, field.path); } return this; } module.exports = automap;