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

d3plus-common

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3plus-common - npm Package Compare versions

Comparing version 0.6.34 to 0.6.35

6

build/d3plus-common.js
/*
d3plus-common v0.6.34
d3plus-common v0.6.35
Common functions and methods used across D3plus modules.

@@ -331,4 +331,4 @@ Copyright (c) 2018 D3plus - https://d3plus.org

if ({}.hasOwnProperty.call(on, event) && !event.includes(".") || event.includes(("." + type))) {
var eventName = event.replace("click", "click touchstart");
if ({}.hasOwnProperty.call(on, event) && !event.includes(".") || event.includes(("." + type)) || event.includes(".all")) {
var eventName = event.replace(/click(\.[a-z]*)/g, "click$1 touchstart$1");
newObj.on[eventName] = wrapFunction(on[event]);

@@ -335,0 +335,0 @@ }

/*
d3plus-common v0.6.34
d3plus-common v0.6.35
Common functions and methods used across D3plus modules.

@@ -7,2 +7,2 @@ Copyright (c) 2018 D3plus - https://d3plus.org

*/
if(typeof Object.assign!=="function"){Object.defineProperty(Object,"assign",{value:function e(r){"use strict";if(r===null){throw new TypeError("Cannot convert undefined or null to object")}var n=Object(r);for(var t=1;t<arguments.length;t++){var i=arguments[t];if(i!==null){for(var o in i){if(Object.prototype.hasOwnProperty.call(i,o)){n[o]=i[o]}}}}return n},writable:true,configurable:true})}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function e(r,n){var t=Object(this);var i=t.length>>>0;if(i===0)return false;var o=n|0;var f=Math.max(o>=0?o:i-Math.abs(o),0);function a(e,r){return e===r||typeof e==="number"&&typeof r==="number"&&isNaN(e)&&isNaN(r)}while(f<i){if(a(t[f],r)){return true}f++}return false}})}(function(e,r){typeof exports==="object"&&typeof module!=="undefined"?r(exports,require("d3-selection"),require("d3-transition"),require("d3-array"),require("d3-collection")):typeof define==="function"&&define.amd?define("d3plus-common",["exports","d3-selection","d3-transition","d3-array","d3-collection"],r):r(e.d3plus={},e.d3Selection,e.d3Transition,e.d3Array,e.d3Collection)})(this,function(e,r,n,t,i){"use strict";function o(e,r){if(r===void 0){return function(r){return r[e]}}return function(n){return n[e]===void 0?r:n[e]}}function f(e){return e&&typeof e==="object"&&!Array.isArray(e)&&e!==void 0?true:false}function a(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];var n=e[0];var t=function(r){var t=e[r];Object.keys(t).forEach(function(e){var r=t[e];if(f(r)){if(n.hasOwnProperty(e)&&f(n[e])){n[e]=a({},n[e],r)}else{n[e]=r}}else if(Array.isArray(r)){if(n.hasOwnProperty(e)&&Array.isArray(n[e])){var i=n[e];r.forEach(function(e,r){if(r<i.length){var n=i[r];if(Object.is(n,e)){return}if(f(n)&&f(e)||Array.isArray(n)&&Array.isArray(e)){i[r]=a({},n,e)}else{i[r]=e}}else{i.push(e)}})}else{n[e]=r}}else{n[e]=r}})};for(var i=1;i<e.length;i++)t(i);return n}function s(e,r){if(r===void 0)r={};for(var n in r){if({}.hasOwnProperty.call(r,n)){e.attr(n,r[n])}}}function u(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}function c(){return""+u()+u()+"-"+u()+"-"+u()+"-"+u()+"-"+u()+u()+u()}var l="D3PLUS-COMMON-RESET";function d(e,r){if(f(e)){for(var n in e){if({}.hasOwnProperty.call(e,n)&&!n.startsWith("_")){var t=r&&f(r)?r[n]:undefined;if(e[n]===l){e[n]=t}else if(f(e[n])){d(e[n],t)}}}}}var h=function e(){this._on={};this._uuid=c()};h.prototype.config=function e(r){var n=this;if(!this._configDefault){var e={};for(var t in n.__proto__){if(t.indexOf("_")!==0&&!["config","constructor","render"].includes(t)){var i=n[t]();e[t]=f(i)?a({},i):i}}this._configDefault=e}if(arguments.length){for(var o in r){if({}.hasOwnProperty.call(r,o)&&o in n){var s=r[o];if(s===l){if(o==="on"){n._on=n._configDefault[o]}else{n[o](n._configDefault[o])}}else{d(s,n._configDefault[o]);n[o](s)}}}return this}else{var u={};for(var c in n.__proto__){if(c.indexOf("_")!==0&&!["config","constructor","render"].includes(c)){u[c]=n[c]()}}return u}};h.prototype.on=function e(r,n){return arguments.length===2?(this._on[r]=n,this):arguments.length?typeof r==="string"?this._on[r]:(this._on=Object.assign({},this._on,r),this):this._on};function p(e,r){if(r===void 0)r=[];if(!r||!(r instanceof Array)||!r.length){return undefined}return r.reduce(function(r,n){return Math.abs(n-e)<Math.abs(r-e)?n:r})}function v(e,r,n){if(e===void 0)e=this._shapeConfig;if(r===void 0)r="shape";if(n===void 0)n=false;var t={duration:this._duration,on:{}};var i=function(e){return function(r,n,t){while(r.__d3plus__){n=r.i;r=r.data||r.feature}return e(r,n,t)}};var o=function(e,n){for(var t in n){if({}.hasOwnProperty.call(n,t)&&!t.includes(".")||t.includes("."+r)){var o=t.replace("click","click touchstart");e.on[o]=i(n[t])}}};var f=function(e,r){for(var n in r){if({}.hasOwnProperty.call(r,n)){if(n==="on"){o(e,r[n])}else if(typeof r[n]==="function"){e[n]=i(r[n])}else if(typeof r[n]==="object"&&!(r instanceof Array)){e[n]={on:{}};f(e[n],r[n])}else{e[n]=r[n]}}}};f(t,e);if(this._on){o(t,this._on)}if(n&&e[n]){f(t,e[n]);if(e[n].on){o(t,e[n].on)}}return t}function y(e){return function r(){return e}}function g(e,t){t=Object.assign({},{condition:true,enter:{},exit:{},parent:r.select("body"),transition:n.transition().duration(0),update:{}},t);var i=/\.([^#]+)/g.exec(e),o=/#([^\.]+)/g.exec(e),f=/^([^.^#]+)/g.exec(e)[1];var a=t.parent.selectAll(e.includes(":")?e.split(":")[1]:e).data(t.condition?[null]:[]);var u=a.enter().append(f).call(s,t.enter);if(o){u.attr("id",o[1])}if(i){u.attr("class",i[1])}a.exit().transition(t.transition).call(s,t.exit).remove();var c=u.merge(a);c.transition(t.transition).call(s,t.update);return c}function m(e,r){if(r===void 0)r={};var n=new Set(t.merge(e.map(function(e){return i.keys(e)}))),o={};n.forEach(function(n){var i=e.map(function(e){return e[n]});var f;if(r[n]){f=r[n](i)}else{var a=i.map(function(e){return e||e===false?e.constructor:e}).filter(function(e){return e!==void 0});if(!a.length){f=undefined}else if(a.indexOf(Array)>=0){f=t.merge(i.map(function(e){return e instanceof Array?e:[e]}));f=Array.from(new Set(f));if(f.length===1){f=f[0]}}else if(a.indexOf(String)>=0){f=Array.from(new Set(i));if(f.length===1){f=f[0]}}else if(a.indexOf(Number)>=0){f=t.sum(i)}else if(a.indexOf(Object)>=0){f=m(i.filter(function(e){return e}))}else{f=Array.from(new Set(i.filter(function(e){return e!==void 0})));if(f.length===1){f=f[0]}}}o[n]=f});return o}function b(e){var r;if(typeof e==="number"){r=[e]}else{r=e.split(/\s+/)}if(r.length===1){r=[r[0],r[0],r[0],r[0]]}else if(r.length===2){r=r.concat(r)}else if(r.length===3){r.push(r[1])}return["top","right","bottom","left"].reduce(function(e,n,t){var i=parseFloat(r[t]);e[n]=i||0;return e},{})}function _(){if("-webkit-transform"in document.body.style){return"-webkit-"}else if("-moz-transform"in document.body.style){return"-moz-"}else if("-ms-transform"in document.body.style){return"-ms-"}else if("-o-transform"in document.body.style){return"-o-"}else{return""}}function O(e,r){if(r===void 0)r={};for(var n in r){if({}.hasOwnProperty.call(r,n)){e.style(n,r[n])}}}e.accessor=o;e.assign=a;e.attrize=s;e.BaseClass=h;e.closest=p;e.configPrep=v;e.constant=y;e.elem=g;e.isObject=f;e.merge=m;e.parseSides=b;e.prefix=_;e.RESET=l;e.stylize=O;e.uuid=c;Object.defineProperty(e,"__esModule",{value:true})});
if(typeof Object.assign!=="function"){Object.defineProperty(Object,"assign",{value:function e(r){"use strict";if(r===null){throw new TypeError("Cannot convert undefined or null to object")}var n=Object(r);for(var t=1;t<arguments.length;t++){var i=arguments[t];if(i!==null){for(var o in i){if(Object.prototype.hasOwnProperty.call(i,o)){n[o]=i[o]}}}}return n},writable:true,configurable:true})}if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function e(r,n){var t=Object(this);var i=t.length>>>0;if(i===0)return false;var o=n|0;var f=Math.max(o>=0?o:i-Math.abs(o),0);function a(e,r){return e===r||typeof e==="number"&&typeof r==="number"&&isNaN(e)&&isNaN(r)}while(f<i){if(a(t[f],r)){return true}f++}return false}})}(function(e,r){typeof exports==="object"&&typeof module!=="undefined"?r(exports,require("d3-selection"),require("d3-transition"),require("d3-array"),require("d3-collection")):typeof define==="function"&&define.amd?define("d3plus-common",["exports","d3-selection","d3-transition","d3-array","d3-collection"],r):r(e.d3plus={},e.d3Selection,e.d3Transition,e.d3Array,e.d3Collection)})(this,function(e,r,n,t,i){"use strict";function o(e,r){if(r===void 0){return function(r){return r[e]}}return function(n){return n[e]===void 0?r:n[e]}}function f(e){return e&&typeof e==="object"&&!Array.isArray(e)&&e!==void 0?true:false}function a(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];var n=e[0];var t=function(r){var t=e[r];Object.keys(t).forEach(function(e){var r=t[e];if(f(r)){if(n.hasOwnProperty(e)&&f(n[e])){n[e]=a({},n[e],r)}else{n[e]=r}}else if(Array.isArray(r)){if(n.hasOwnProperty(e)&&Array.isArray(n[e])){var i=n[e];r.forEach(function(e,r){if(r<i.length){var n=i[r];if(Object.is(n,e)){return}if(f(n)&&f(e)||Array.isArray(n)&&Array.isArray(e)){i[r]=a({},n,e)}else{i[r]=e}}else{i.push(e)}})}else{n[e]=r}}else{n[e]=r}})};for(var i=1;i<e.length;i++)t(i);return n}function s(e,r){if(r===void 0)r={};for(var n in r){if({}.hasOwnProperty.call(r,n)){e.attr(n,r[n])}}}function u(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}function c(){return""+u()+u()+"-"+u()+"-"+u()+"-"+u()+"-"+u()+u()+u()}var l="D3PLUS-COMMON-RESET";function d(e,r){if(f(e)){for(var n in e){if({}.hasOwnProperty.call(e,n)&&!n.startsWith("_")){var t=r&&f(r)?r[n]:undefined;if(e[n]===l){e[n]=t}else if(f(e[n])){d(e[n],t)}}}}}var h=function e(){this._on={};this._uuid=c()};h.prototype.config=function e(r){var n=this;if(!this._configDefault){var e={};for(var t in n.__proto__){if(t.indexOf("_")!==0&&!["config","constructor","render"].includes(t)){var i=n[t]();e[t]=f(i)?a({},i):i}}this._configDefault=e}if(arguments.length){for(var o in r){if({}.hasOwnProperty.call(r,o)&&o in n){var s=r[o];if(s===l){if(o==="on"){n._on=n._configDefault[o]}else{n[o](n._configDefault[o])}}else{d(s,n._configDefault[o]);n[o](s)}}}return this}else{var u={};for(var c in n.__proto__){if(c.indexOf("_")!==0&&!["config","constructor","render"].includes(c)){u[c]=n[c]()}}return u}};h.prototype.on=function e(r,n){return arguments.length===2?(this._on[r]=n,this):arguments.length?typeof r==="string"?this._on[r]:(this._on=Object.assign({},this._on,r),this):this._on};function p(e,r){if(r===void 0)r=[];if(!r||!(r instanceof Array)||!r.length){return undefined}return r.reduce(function(r,n){return Math.abs(n-e)<Math.abs(r-e)?n:r})}function v(e,r,n){if(e===void 0)e=this._shapeConfig;if(r===void 0)r="shape";if(n===void 0)n=false;var t={duration:this._duration,on:{}};var i=function(e){return function(r,n,t){while(r.__d3plus__){n=r.i;r=r.data||r.feature}return e(r,n,t)}};var o=function(e,n){for(var t in n){if({}.hasOwnProperty.call(n,t)&&!t.includes(".")||t.includes("."+r)||t.includes(".all")){var o=t.replace(/click(\.[a-z]*)/g,"click$1 touchstart$1");e.on[o]=i(n[t])}}};var f=function(e,r){for(var n in r){if({}.hasOwnProperty.call(r,n)){if(n==="on"){o(e,r[n])}else if(typeof r[n]==="function"){e[n]=i(r[n])}else if(typeof r[n]==="object"&&!(r instanceof Array)){e[n]={on:{}};f(e[n],r[n])}else{e[n]=r[n]}}}};f(t,e);if(this._on){o(t,this._on)}if(n&&e[n]){f(t,e[n]);if(e[n].on){o(t,e[n].on)}}return t}function y(e){return function r(){return e}}function g(e,t){t=Object.assign({},{condition:true,enter:{},exit:{},parent:r.select("body"),transition:n.transition().duration(0),update:{}},t);var i=/\.([^#]+)/g.exec(e),o=/#([^\.]+)/g.exec(e),f=/^([^.^#]+)/g.exec(e)[1];var a=t.parent.selectAll(e.includes(":")?e.split(":")[1]:e).data(t.condition?[null]:[]);var u=a.enter().append(f).call(s,t.enter);if(o){u.attr("id",o[1])}if(i){u.attr("class",i[1])}a.exit().transition(t.transition).call(s,t.exit).remove();var c=u.merge(a);c.transition(t.transition).call(s,t.update);return c}function m(e,r){if(r===void 0)r={};var n=new Set(t.merge(e.map(function(e){return i.keys(e)}))),o={};n.forEach(function(n){var i=e.map(function(e){return e[n]});var f;if(r[n]){f=r[n](i)}else{var a=i.map(function(e){return e||e===false?e.constructor:e}).filter(function(e){return e!==void 0});if(!a.length){f=undefined}else if(a.indexOf(Array)>=0){f=t.merge(i.map(function(e){return e instanceof Array?e:[e]}));f=Array.from(new Set(f));if(f.length===1){f=f[0]}}else if(a.indexOf(String)>=0){f=Array.from(new Set(i));if(f.length===1){f=f[0]}}else if(a.indexOf(Number)>=0){f=t.sum(i)}else if(a.indexOf(Object)>=0){f=m(i.filter(function(e){return e}))}else{f=Array.from(new Set(i.filter(function(e){return e!==void 0})));if(f.length===1){f=f[0]}}}o[n]=f});return o}function b(e){var r;if(typeof e==="number"){r=[e]}else{r=e.split(/\s+/)}if(r.length===1){r=[r[0],r[0],r[0],r[0]]}else if(r.length===2){r=r.concat(r)}else if(r.length===3){r.push(r[1])}return["top","right","bottom","left"].reduce(function(e,n,t){var i=parseFloat(r[t]);e[n]=i||0;return e},{})}function _(){if("-webkit-transform"in document.body.style){return"-webkit-"}else if("-moz-transform"in document.body.style){return"-moz-"}else if("-ms-transform"in document.body.style){return"-ms-"}else if("-o-transform"in document.body.style){return"-o-"}else{return""}}function O(e,r){if(r===void 0)r={};for(var n in r){if({}.hasOwnProperty.call(r,n)){e.style(n,r[n])}}}e.accessor=o;e.assign=a;e.attrize=s;e.BaseClass=h;e.closest=p;e.configPrep=v;e.constant=y;e.elem=g;e.isObject=f;e.merge=m;e.parseSides=b;e.prefix=_;e.RESET=l;e.stylize=O;e.uuid=c;Object.defineProperty(e,"__esModule",{value:true})});

@@ -28,4 +28,4 @@ /**

if ({}.hasOwnProperty.call(on, event) && !event.includes(".") || event.includes(("." + type))) {
var eventName = event.replace("click", "click touchstart");
if ({}.hasOwnProperty.call(on, event) && !event.includes(".") || event.includes(("." + type)) || event.includes(".all")) {
var eventName = event.replace(/click(\.[a-z]*)/g, "click$1 touchstart$1");
newObj.on[eventName] = wrapFunction(on[event]);

@@ -32,0 +32,0 @@ }

{
"name": "d3plus-common",
"version": "0.6.34",
"version": "0.6.35",
"description": "Common functions and methods used across D3plus modules.",

@@ -5,0 +5,0 @@ "main": "build/d3plus-common.js",

# d3plus-common
[![NPM Release](http://img.shields.io/npm/v/d3plus-common.svg?style=flat)](https://www.npmjs.org/package/d3plus-common) [![Build Status](https://travis-ci.org/d3plus/d3plus-common.svg?branch=master)](https://travis-ci.org/d3plus/d3plus-common) [![Dependency Status](http://img.shields.io/david/d3plus/d3plus-common.svg?style=flat)](https://david-dm.org/d3plus/d3plus-common) [![Gitter](https://img.shields.io/badge/-chat_on_gitter-brightgreen.svg?style=flat&logo=gitter-white)](https://gitter.im/d3plus/)
[![NPM Release](http://img.shields.io/npm/v/d3plus-common.svg?style=flat)](https://www.npmjs.org/package/d3plus-common) [![Build Status](https://travis-ci.org/d3plus/d3plus-common.svg?branch=master)](https://travis-ci.org/d3plus/d3plus-common) [![Dependency Status](http://img.shields.io/david/d3plus/d3plus-common.svg?style=flat)](https://david-dm.org/d3plus/d3plus-common) [![Gitter](https://img.shields.io/badge/-chat_on_gitter-brightgreen.svg?style=flat&logo=gitter-white)](https://gitter.im/d3plus/) [![1.0 progress](https://img.shields.io/badge/1.0_progress-0%25-red.svg?style=flat)](https://github.com/d3plus/d3plus-common/projects/1)

@@ -327,2 +327,2 @@ Common functions and methods used across D3plus modules.

###### <sub>Documentation generated on Fri, 30 Mar 2018 18:03:19 GMT</sub>
###### <sub>Documentation generated on Thu, 12 Apr 2018 20:10:48 GMT</sub>

Sorry, the diff of this file is not supported yet

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