New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

rangy-serializer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rangy-serializer

A cross-browser DOM range and selection library

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Rangy2

A cross-browser JavaScript range and selection library.

Compare to rangy 1.x

  • migrated to typescript
    • so, the definition types is always updated
  • use typescript's module (import / export) instead of the complex rangy.createModule logic
  • remove TextRange & inactive modules
    • if you use those modules, please migrate to rangy2 & create a pull request.
  • use rollup instead of the old complex manually with text-replacing building logic
  • don't support too-outdated browser: IE < 9
    • removed many outdated feature testing logic (for too-outdated browser)
  • migrated testing code to QUnit
    • dont use jest because we need test in android/ ios
  • remove rangy.init (& rangy.addInitListener)
    • rangy is "initialized" even before DOM ready!
    • So, many bugs like 326, 321 is auto-fixed!

Guide to migrate from rangy 1.x to rangy2

  • removed:
    • util.extend. Pls use Object.assign
    • util.toArray. Pls use Array.slice
    • util.forEach
    • dom.arrayContains. Pls use Array.includes
    • initialized, init, addInitListener. rangy is now always initialized right when import
    • addShimListener
    • createModule, createCoreModule
    • warn, fail, supported
    • RangePrototype, rangePrototype, selectionPrototype
    • WrappedTextRange
  • note: to support IE, we bundled the following core-js modules into dist/*/bundles/index.umd.js (not bundle into index.esm.js & other module types)
import "core-js/features/array/includes";
import "core-js/features/object/assign";

Install

yarn add rangy2

Documentation

Documentation is in the GitHub wiki.

Dev guide

yarn install
yarn run dev
  • test by opening test/*.html in a desktop or mobile browser

Keywords

range

FAQs

Package last updated on 19 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts