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.5 to 0.4.7

build/d3.js

4

index.js

@@ -7,3 +7,3 @@ import mouse from "./src/mouse";

import selectAll from "./src/selectAll";
import Selection from "./src/selection";
import selection from "./src/selection";
import touch from "./src/touch";

@@ -21,5 +21,5 @@ import touches from "./src/touches";

selectAll,
Selection as selection,
selection,
touch,
touches
};
{
"name": "d3-selection",
"version": "0.4.5",
"description": "Data-driven DOM manipulation.",
"version": "0.4.7",
"description": "Data-driven DOM manipulation: select elements and join them to data.",
"keywords": [
"d3",
"dom",
"selection",
"data-join"
],
"homepage": "https://github.com/d3/d3-selection",
"license": "BSD-3-Clause",
"author": {
"name": "Mike Bostock",
"url": "http://bost.ocks.org/mike"
},
"main": "build/d3",
"jsnext:main": "index",

@@ -11,12 +24,13 @@ "repository": {

"scripts": {
"pretest": "mkdir -p build && d3-bundler -- test/d3.js > build/d3.js",
"test": "faucet `find test -name '*-test.js'`"
"pretest": "mkdir -p build && d3-bundler --polyfill-map --format=umd --name=d3 -- d3.js > build/d3.js",
"test": "faucet `find test -name '*-test.js'`",
"prepublish": "npm run test && uglifyjs build/d3.js -c -m -o build/d3.min.js && rm -f build/d3.zip && zip -j build/d3.zip -- LICENSE README.md build/d3.js build/d3.min.js"
},
"devDependencies": {
"d3-bundler": "~0.2.2",
"d3-bundler": "~0.2.5",
"faucet": "0.0",
"jsdom": "3",
"requirejs": "2",
"tape": "4"
"tape": "4",
"uglifyjs": "2"
}
}
import arrayify from "./arrayify";
import Selection from "./selection";
import {Selection} from "./selection";

@@ -4,0 +4,0 @@ export default function(selection) {

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

import Selection from "./selection";
import {Selection} from "./selection";
export default function(selector) {
var root;
if (typeof selector === "string") {
root = [document.querySelector(selector)];
root._parent = document.documentElement;
} else {
root = [selector];
root._parent = null;
}
return new Selection(root, 1);
return new Selection([typeof selector === "string" ? document.querySelector(selector) : selector], 1);
};

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

import Selection from "./selection";
import {Selection} from "./selection";
export default function(selector) {
var root;
if (typeof selector === "string") {
root = document.querySelectorAll(selector);
root._parent = document.documentElement;
} else {
root = selector;
root._parent = null;
}
return new Selection(root, 1);
return new Selection(typeof selector === "string" ? document.querySelectorAll(selector) : selector, 1);
};

@@ -1,2 +0,2 @@

import Selection from "./selection";
import {Selection} from "./selection";

@@ -3,0 +3,0 @@ // The filter may either be a selector string (e.g., ".foo")

@@ -1,2 +0,2 @@

import Selection from "./selection";
import {Selection} from "./selection";
import selectorOf from "./selectorOf";

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import Selection from "./selection";
import {Selection} from "./selection";

@@ -3,0 +3,0 @@ // The selector may either be a selector string (e.g., ".foo")

@@ -31,9 +31,13 @@ import selection_select from "./selection-select";

// Note that [Node, …] and NodeList are used interchangeably; see arrayify.
function Selection(root, depth) {
export function Selection(root, depth) {
this._root = root;
this._depth = depth;
this._enter = this._update = this._exit = null;
};
function selection() {
return new Selection([document.documentElement], 1);
}
Selection.prototype = {
Selection.prototype = selection.prototype = {
select: selection_select,

@@ -69,2 +73,2 @@ selectAll: selection_selectAll,

export default Selection;
export default selection;

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