UNPKG

@commodo/fields-storage-nedb

Version:

We're working hard to get all the docs in order. New articles will be added daily.

23 lines (18 loc) 547 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _fields = require("@commodo/fields"); var _fieldsStorageNedb = require("@commodo/fields-storage-nedb"); var _default = () => { return (0, _fields.string)({ validation: value => { if (value && !(0, _fieldsStorageNedb.isId)(value)) { throw new Error(`A valid Mongo ID must be assigned to the "id" field (tried to assign ${value}).`); } } }); }; exports.default = _default; //# sourceMappingURL=id.js.map