UNPKG

362 BJavaScriptView Raw
1'use strict';
2
3var getItemsAtRange = require('./getItemsAtRange');
4
5/**
6 * @param {PluginOptions} opts Plugin options
7 * @param {Slate.Value} value
8 * @return {Boolean} True if selection is inside a list (and can be unwrapped)
9 */
10function isSelectionInList(opts, value) {
11 return !getItemsAtRange(opts, value).isEmpty();
12}
13
14module.exports = isSelectionInList;
\No newline at end of file