import FDBKeyRange from"../FDBKeyRange.js";import{DataError}from"./errors.js";import valueToKey from"./valueToKey.js";const valueToKeyRange=(value,nullDisallowedFlag=!1)=>{if(value instanceof FDBKeyRange)return value;if(null==value){if(nullDisallowedFlag)throw new DataError;return new FDBKeyRange(void 0,void 0,!1,!1)}const key=valueToKey(value);return FDBKeyRange.only(key)};export default valueToKeyRange;