Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

selection-ranges

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selection-ranges - npm Package Compare versions

Comparing version 3.0.3 to 4.0.0

dist/index.js.map

43

dist/index.js

@@ -1,5 +0,5 @@

'use strict';
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
Object.defineProperty(exports, '__esModule', { value: true });
/**

@@ -9,3 +9,3 @@ * Expose `xor`

var componentXor = xor;
var componentXor = xor$1;

@@ -25,3 +25,3 @@ /**

function xor(a, b) {
function xor$1(a, b) {
return a ^ b;

@@ -46,3 +46,3 @@ }

var componentProps = function(str, fn){
var p = unique(props(str));
var p = unique(props$1(str));
if (fn && 'string' == typeof fn) fn = prefixed(fn);

@@ -61,3 +61,3 @@ if (fn) return map(str, p, fn);

function props(str) {
function props$1(str) {
return str

@@ -122,6 +122,6 @@ .replace(/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^/]+)\//g, '')

var xor = componentXor;
var props = componentProps;
/**

@@ -253,7 +253,7 @@ * Export `Iterator`

while (node) {
if (componentXor(next, closing) && node[child]) {
if (xor(next, closing) && node[child]) {
// element with children: <em>...</em>
node = node[child];
closing = !next;
} else if (1 == node.nodeType && !node[child] && componentXor(next, closing)) {
} else if (1 == node.nodeType && !node[child] && xor(next, closing)) {
// empty element tag: <em></em>

@@ -387,3 +387,3 @@ closing = next;

case 'string':
return new Function('node', 'return ' + componentProps(expr, 'node.'));
return new Function('node', 'return ' + props(expr, 'node.'));
case 'function':

@@ -428,2 +428,9 @@ return expr;

var iterator = /*@__PURE__*/getDefaultExportFromCjs(domIterator);
/**
* Module Dependencies
*/
var selection = window.getSelection();

@@ -509,3 +516,3 @@

var i = domIterator(el.firstChild, el);
var i = iterator(el.firstChild, el);

@@ -655,3 +662,3 @@ var next = i.node;

var i = domIterator(el.firstChild, el);
var i = iterator(el.firstChild, el);

@@ -761,7 +768,3 @@ var next = i.node;

exports.applyRange = applyRange;
exports.getWindowSelection = getWindowSelection;
exports.isSelected = isSelected;
exports.setRange = setRange;
exports.getRange = getRange;
exports.annotateRange = annotateRange;
export { annotateRange, applyRange, getRange, getWindowSelection, isSelected, setRange };
//# sourceMappingURL=index.js.map
{
"name": "selection-ranges",
"version": "3.0.3",
"version": "4.0.0",
"description": "Selection range manipulation for contenteditable elements",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"type": "module",
"exports": {
".": {
"import": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"all": "run-s lint test bundle test:integration",
"bundle": "rollup -c",
"all": "run-s lint test",
"bundle": "rollup -c --bundleConfigAsCjs",
"dev": "npm test -- --auto-watch --no-single-run",
"lint": "eslint .",
"prepublishOnly": "run-s bundle test:integration",
"test": "karma start karma.conf.js",
"test:integration": "karma start test/integration/karma.conf.js"
"pretest": "run-s bundle",
"test": "karma start karma.conf.cjs",
"prepare": "run-s bundle"
},

@@ -31,28 +36,26 @@ "repository": {

"devDependencies": {
"babel-core": "^6.26.3",
"babel-preset-env": "^1.7.0",
"babelify": "^8.0.0",
"browserify": "^16.1.0",
"chai": "^4.1.2",
"eslint": "^5.13.0",
"eslint-plugin-bpmn-io": "^0.6.1",
"karma": "^4.0.0",
"karma-browserify": "^5.2.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"chai": "^4.4.1",
"eslint": "^8.57.0",
"eslint-plugin-bpmn-io": "^1.0.0",
"karma": "^6.4.3",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"mocha": "^5.0.1",
"karma-chrome-launcher": "^3.2.0",
"karma-firefox-launcher": "^2.1.3",
"karma-mocha": "^2.0.1",
"karma-webpack": "^5.0.1",
"mocha": "^10.3.0",
"npm-run-all": "^4.1.2",
"puppeteer": "^1.1.0",
"rollup": "^1.1.2",
"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-uglify": "^6.0.2",
"watchify": "^3.10.0"
"puppeteer": "^22.4.0",
"rollup": "^4.12.1",
"webpack": "^5.90.3"
},
"dependencies": {
"dom-iterator": "^1.0.0"
}
},
"files": [
"dist"
]
}
# selection-ranges
[![Build Status](https://travis-ci.org/nikku/selection-ranges.svg?branch=master)](https://travis-ci.org/nikku/selection-ranges)
[![CI](https://github.com/nikku/selection-ranges/actions/workflows/CI.yml/badge.svg)](https://github.com/nikku/selection-ranges/actions/workflows/CI.yml)
Manipulate selection ranges on contenteditable elements.
Manipulate selection ranges on `contenteditable` elements.

@@ -75,2 +75,2 @@

MIT
MIT
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc