- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
35 lines
919 B
JavaScript
35 lines
919 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.isCursorAtEnd = isCursorAtEnd;
|
|
exports.isCursorAtStart = isCursorAtStart;
|
|
|
|
var _selectionRange = require("./selectionRange");
|
|
|
|
var _getValue2 = require("./getValue");
|
|
|
|
function isCursorAtEnd(element) {
|
|
var _getValue;
|
|
|
|
const {
|
|
selectionStart,
|
|
selectionEnd
|
|
} = (0, _selectionRange.getSelectionRange)(element);
|
|
return selectionStart === selectionEnd && (selectionStart != null ? selectionStart :
|
|
/* istanbul ignore next */
|
|
0) === ((_getValue = (0, _getValue2.getValue)(element)) != null ? _getValue :
|
|
/* istanbul ignore next */
|
|
'').length;
|
|
}
|
|
|
|
function isCursorAtStart(element) {
|
|
const {
|
|
selectionStart,
|
|
selectionEnd
|
|
} = (0, _selectionRange.getSelectionRange)(element);
|
|
return selectionStart === selectionEnd && (selectionStart != null ? selectionStart :
|
|
/* istanbul ignore next */
|
|
0) === 0;
|
|
} |