Socket
Socket
Sign inDemoInstall

d3-selection

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-selection - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

2

index.js

@@ -10,4 +10,6 @@ import mouse from "./src/mouse";

import touches from "./src/touches";
import {event} from "./src/selection-event"
export {
event,
mouse,

@@ -14,0 +16,0 @@ namespace,

10

package.json
{
"name": "d3-selection",
"version": "0.4.3",
"version": "0.4.4",
"description": "Data-driven DOM manipulation.",
"main": "dist/d3-selection",
"jsnext:main": "index",

@@ -11,2 +10,6 @@ "repository": {

},
"scripts": {
"pretest": "mkdir -p build && d3-bundler -- index.js > build/d3.js",
"test": "faucet `find test -name '*-test.js'`"
},
"devDependencies": {

@@ -17,5 +20,4 @@ "d3-bundler": "~0.2.1",

"requirejs": "2",
"tape": "4",
"uglify-js": "2"
"tape": "4"
}
}
import select from "./select";
var bug44083 = global.navigator && /WebKit/.test(global.navigator.userAgent) ? -1 : 0; // https://bugs.webkit.org/show_bug.cgi?id=44083
var bug44083 = typeof navigator !== "undefined" && /WebKit/.test(navigator.userAgent) ? -1 : 0; // https://bugs.webkit.org/show_bug.cgi?id=44083

@@ -5,0 +5,0 @@ export default function(node, event) {

@@ -16,3 +16,3 @@ // The value may either be an array or a function that returns an array.

if (typeof value !== "function") value = valueOf(value);
if (typeof value !== "function") value = valueOf_(value);
visit(this._root, this.enter()._root, this.exit()._root, depth);

@@ -179,3 +179,3 @@

function valueOf(value) {
function valueOf_(value) { // XXX https://github.com/rollup/rollup/issues/12
return function() {

@@ -182,0 +182,0 @@ return value;

@@ -5,3 +5,5 @@ import requote from "./requote";

if (global.document) {
export var event = null;
if (typeof document !== "undefined") {
var element = document.documentElement;

@@ -60,10 +62,10 @@ if (!("onmouseenter" in element)) {

function listenerOf(listener, ancestors, args) {
return function(event) {
var i = ancestors.length, event0 = global.d3.event; // Events can be reentrant (e.g., focus).
return function(event1) {
var i = ancestors.length, event0 = event; // Events can be reentrant (e.g., focus).
while (--i >= 0) args[i << 1] = ancestors[i].__data__;
global.d3.event = event;
event = event1;
try {
listener.apply(ancestors[0], args);
} finally {
global.d3.event = event0;
event = event0;
}

@@ -70,0 +72,0 @@ };

@@ -56,3 +56,3 @@ import Selection from "./selection";

if (global.document) {
if (typeof document !== "undefined") {
var element = document.documentElement;

@@ -59,0 +59,0 @@ if (!element.matches) {

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

import {event} from "./selection-event";
export default function() {
var event = global.d3.event, source;
while (source = event.sourceEvent) event = source;
return event;
var current = event, source;
while (source = current.sourceEvent) current = source;
return current;
};
var tape = require("tape"),
path = require("path"),
d3 = require("../"),
d3 = require("../build/d3"),
requirejs = require("requirejs");

@@ -8,3 +8,3 @@

test.equal(typeof d3.select, "function");
test.equal(global.d3, d3);
test.ok(!("d3" in global));
test.end();

@@ -14,17 +14,7 @@ });

tape("can load as AMD module", function(test) {
delete global.d3;
requirejs([path.join(__dirname, "../dist/d3-selection")], function(d3) {
requirejs([path.join(__dirname, "../build/d3")], function(d3) {
test.equal(typeof d3.select, "function");
test.end();
global.d3 = d3;
delete global.d3;
});
});
tape("can load as minified AMD module", function(test) {
delete global.d3;
requirejs([path.join(__dirname, "../dist/d3-selection.min")], function(d3) {
test.equal(typeof d3.select, "function");
test.end();
global.d3 = d3;
});
});
var tape = require("tape"),
jsdom = require("jsdom"),
d3 = require("../");
d3 = require("../build/d3");

@@ -5,0 +5,0 @@ tape("d3.select can select by string", function(test) {

var tape = require("tape"),
jsdom = require("jsdom"),
d3 = require("../");
d3 = require("../build/d3");

@@ -5,0 +5,0 @@ tape("d3.selectAll can select by string", function(test) {

var tape = require("tape"),
jsdom = require("jsdom"),
d3 = require("../");
d3 = require("../build/d3");

@@ -5,0 +5,0 @@ tape("selection.enter initially returns an empty selection", function(test) {

var tape = require("tape"),
jsdom = require("jsdom"),
d3 = require("../");
d3 = require("../build/d3");

@@ -5,0 +5,0 @@ tape("selection.event registers a listener which receives events", function(test) {

var tape = require("tape"),
jsdom = require("jsdom"),
d3 = require("../");
d3 = require("../build/d3");

@@ -5,0 +5,0 @@ tape("selection.exit initially returns an empty selection", function(test) {

var tape = require("tape"),
jsdom = require("jsdom"),
d3 = require("../");
d3 = require("../build/d3");

@@ -5,0 +5,0 @@ tape("selection.select can select elements (in the simplest case)", function(test) {

var tape = require("tape"),
jsdom = require("jsdom"),
d3 = require("../");
d3 = require("../build/d3");

@@ -5,0 +5,0 @@ tape("selection.selectAll can select elements (in the simplest case)", function(test) {

Sorry, the diff of this file is not supported yet

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