Socket
Socket
Sign inDemoInstall

fastdom

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastdom - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

1

fastdom.d.ts

@@ -8,2 +8,3 @@ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

mutate<T extends () => void>(task: T, context?: any): T;
catch: null | ((e: unknown) => any);
}

@@ -10,0 +11,0 @@

30

fastdom.js

@@ -51,2 +51,15 @@ !(function(win) {

/**
* We run this inside a try catch
* so that if any jobs error, we
* are able to recover and continue
* to flush the batch until it's empty.
*
* @param {Array} tasks
*/
runTasks: function(tasks) {
debug('run tasks');
var task; while (task = tasks.shift()) task();
},
/**
* Adds a job to the read batch and

@@ -182,5 +195,5 @@ * schedules a new frame if need be.

debug('flushing reads', reads.length);
runTasks(reads);
fastdom.runTasks(reads);
debug('flushing writes', writes.length);
runTasks(writes);
fastdom.runTasks(writes);
} catch (e) { error = e; }

@@ -201,15 +214,2 @@

/**
* We run this inside a try catch
* so that if any jobs error, we
* are able to recover and continue
* to flush the batch until it's empty.
*
* @private
*/
function runTasks(tasks) {
debug('run tasks');
var task; while (task = tasks.shift()) task();
}
/**
* Remove an item from an Array.

@@ -216,0 +216,0 @@ *

{
"name": "fastdom",
"description": "Eliminates layout thrashing by batching DOM read/write operations",
"version": "1.0.9",
"version": "1.0.10",
"main": "fastdom.js",

@@ -6,0 +6,0 @@ "types": "fastdom.d.ts",

@@ -1,4 +0,6 @@

# fastdom [![Build Status](https://travis-ci.org/wilsonpage/fastdom.svg?branch=master)](https://travis-ci.org/wilsonpage/fastdom) [![NPM version](https://badge.fury.io/js/fastdom.svg)](http://badge.fury.io/js/fastdom) [![npm](https://img.shields.io/npm/dm/fastdom.svg?maxAge=2592000)]() [![Coverage Status](https://coveralls.io/repos/wilsonpage/fastdom/badge.svg?branch=master&service=github)](https://coveralls.io/github/wilsonpage/fastdom?branch=master) ![gzip size](http://img.badgesize.io/https://unpkg.com/fastdom/fastdom.min.js?compression=gzip)
# fastdom [![Twitter Follow](https://img.shields.io/twitter/follow/wilsonpage?style=social)](https://twitter.com/wilsonpage)
[![Build Status](https://travis-ci.org/wilsonpage/fastdom.svg?branch=master)](https://travis-ci.org/wilsonpage/fastdom) [![NPM version](https://badge.fury.io/js/fastdom.svg)](http://badge.fury.io/js/fastdom) [![npm](https://img.shields.io/npm/dm/fastdom.svg?maxAge=2592000)]() [![Coverage Status](https://coveralls.io/repos/wilsonpage/fastdom/badge.svg?branch=master&service=github)](https://coveralls.io/github/wilsonpage/fastdom?branch=master) ![gzip size](http://img.badgesize.io/https://unpkg.com/fastdom/fastdom.min.js?compression=gzip)
Eliminates layout thrashing by batching DOM read/write operations (~600 bytes minified gzipped).

@@ -5,0 +7,0 @@

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