New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@d3fc/d3fc-random-data

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@d3fc/d3fc-random-data - npm Package Compare versions

Comparing version 3.0.19 to 3.1.0

39

build/d3fc-random-data.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-random'), require('d3-time')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-random', 'd3-time'], factory) :
(global = global || self, factory(global.fc = global.fc || {}, global.d3, global.d3));
}(this, function (exports, d3Random, d3Time) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-random'), require('@d3fc/d3fc-rebind'), require('d3-time')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-random', '@d3fc/d3fc-rebind', 'd3-time'], factory) :
(global = global || self, factory(global.fc = global.fc || {}, global.d3, global.fc, global.d3));
}(this, function (exports, d3Random, d3fcRebind, d3Time) { 'use strict';

@@ -90,31 +90,2 @@ function _typeof(obj) {

var createReboundMethod = ((target, source, name) => {
const method = source[name];
if (typeof method !== 'function') {
throw new Error(`Attempt to rebind ${name} which isn't a function on the source object`);
}
return (...args) => {
var value = method.apply(source, args);
return value === source ? target : value;
};
});
const createTransform = transforms => name => transforms.reduce((name, fn) => name && fn(name), name);
var rebindAll = ((target, source, ...transforms) => {
const transform = createTransform(transforms);
for (const name of Object.keys(source)) {
const result = transform(name);
if (result) {
target[result] = createReboundMethod(target, source, name);
}
}
return target;
});
function functor(v) {

@@ -304,3 +275,3 @@ return typeof v === 'function' ? v : function () {

rebindAll(financial, gbm);
d3fcRebind.rebindAll(financial, gbm);
return financial;

@@ -307,0 +278,0 @@ }

2

build/d3fc-random-data.min.js

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

(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("d3-random"),require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-random","d3-time"],b):(a=a||self,b(a.fc=a.fc||{},a.d3,a.d3))})(this,function(a,b,c){'use strict';function d(a){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},d(a)}function e(){var a=1,c=20,d=.1,e=.1,f=b.randomNormal(),g=function(){for(var b=Math.exp,g=Math.sqrt,h=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,j=a/c,k=[],l=0;l<c+1;l++){k.push(h);var m=f()*g(j)*e+(d-e*e/2)*j;h*=b(m)}return k};return g.period=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],g):a},g.steps=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],g):c},g.mu=function(){return arguments.length?(d=0>=arguments.length?void 0:arguments[0],g):d},g.sigma=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],g):e},g.random=function(){return arguments.length?(f=0>=arguments.length?void 0:arguments[0],g):f},g}function f(a){return"function"==typeof a?a:function(){return a}}function g(){var a=new Date,g=100,h=c.timeDay,i=1,k=c.timeYear,l=1,m=null,n=function(){var a=Math.ceil,c=b.randomNormal(1,.1);return a(1e3*c())},o=e(),p=function(a){var b=k.offset(a,l)-a;return(h.offset(a,i)-a)/b},q=function(a,b){var c=Math.min,d=Math.max,e=p(a),f=o.period(e)(b),g={date:a,open:f[0],high:d.apply(Math,f),low:c.apply(Math,f),close:f[o.steps()]};return g.volume=n(g),g},r=function(b){var c,d,e;do c=b?h.offset(b.date,i):new Date(a.getTime()),d=b?b.close:g,b=q(c,d),e=m&&!m(b);while(e);return b},s=function(){var a,b={};return b.next=function(){var b=r(a);return a=b,b},b.take=function(a){return b.until(function(b,c){return!a||0>a||c===a})},b.until=function(b){for(var c=[],d=0,e=r(a),f=b&&!b(e,d);f;)c.push(e),a=e,e=r(a),d+=1,f=b&&!b(e,d);return c},b},t=function(a){return s().take(a)};if(t.stream=s,"function"!=typeof Symbol||"symbol"!==d(Symbol.iterator))throw new Error("d3fc-random-data depends on Symbol. Make sure that you load a polyfill in older browsers. See README.");return t[Symbol.iterator]=function(){var a=s();return{next:function(){return{value:a.next(),done:!1}}}},t.startDate=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],t):a},t.startPrice=function(){return arguments.length?(g=0>=arguments.length?void 0:arguments[0],t):g},t.interval=function(){return arguments.length?(h=0>=arguments.length?void 0:arguments[0],t):h},t.intervalStep=function(){return arguments.length?(i=0>=arguments.length?void 0:arguments[0],t):i},t.unitInterval=function(){return arguments.length?(k=0>=arguments.length?void 0:arguments[0],t):k},t.unitIntervalStep=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],t):l},t.filter=function(){return arguments.length?(m=0>=arguments.length?void 0:arguments[0],t):m},t.volume=function(){return arguments.length?(n=f(0>=arguments.length?void 0:arguments[0]),t):n},j(t,o),t}var h=(a,b,c)=>{const d=b[c];if("function"!=typeof d)throw new Error(`Attempt to rebind ${c} which isn't a function on the source object`);return(...c)=>{var e=d.apply(b,c);return e===b?a:e}};const i=a=>b=>a.reduce((a,b)=>a&&b(a),b);var j=(a,b,...c)=>{const d=i(c);for(const e of Object.keys(b)){const c=d(e);c&&(a[c]=h(a,b,e))}return a};a.randomFinancial=g,a.randomGeometricBrownianMotion=e,a.randomSkipWeekends=function(a){var b=a.date.getDay();return 0!==b&&6!==b},Object.defineProperty(a,"__esModule",{value:!0})});
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("d3-random"),require("@d3fc/d3fc-rebind"),require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-random","@d3fc/d3fc-rebind","d3-time"],b):(a=a||self,b(a.fc=a.fc||{},a.d3,a.fc,a.d3))})(this,function(a,b,c,d){'use strict';function e(a){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e(a)}function f(){var a=1,c=20,d=.1,e=.1,f=b.randomNormal(),g=function(){for(var b=Math.exp,g=Math.sqrt,h=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,j=a/c,k=[],l=0;l<c+1;l++){k.push(h);var m=f()*g(j)*e+(d-e*e/2)*j;h*=b(m)}return k};return g.period=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],g):a},g.steps=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],g):c},g.mu=function(){return arguments.length?(d=0>=arguments.length?void 0:arguments[0],g):d},g.sigma=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],g):e},g.random=function(){return arguments.length?(f=0>=arguments.length?void 0:arguments[0],g):f},g}function g(a){return"function"==typeof a?a:function(){return a}}function h(){var a=new Date,h=100,i=d.timeDay,j=1,k=d.timeYear,l=1,m=null,n=function(){var a=Math.ceil,c=b.randomNormal(1,.1);return a(1e3*c())},o=f(),p=function(a){var b=k.offset(a,l)-a;return(i.offset(a,j)-a)/b},q=function(a,b){var c=Math.min,d=Math.max,e=p(a),f=o.period(e)(b),g={date:a,open:f[0],high:d.apply(Math,f),low:c.apply(Math,f),close:f[o.steps()]};return g.volume=n(g),g},r=function(b){var c,d,e;do c=b?i.offset(b.date,j):new Date(a.getTime()),d=b?b.close:h,b=q(c,d),e=m&&!m(b);while(e);return b},s=function(){var a,b={};return b.next=function(){var b=r(a);return a=b,b},b.take=function(a){return b.until(function(b,c){return!a||0>a||c===a})},b.until=function(b){for(var c=[],d=0,e=r(a),f=b&&!b(e,d);f;)c.push(e),a=e,e=r(a),d+=1,f=b&&!b(e,d);return c},b},t=function(a){return s().take(a)};if(t.stream=s,"function"!=typeof Symbol||"symbol"!==e(Symbol.iterator))throw new Error("d3fc-random-data depends on Symbol. Make sure that you load a polyfill in older browsers. See README.");return t[Symbol.iterator]=function(){var a=s();return{next:function(){return{value:a.next(),done:!1}}}},t.startDate=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],t):a},t.startPrice=function(){return arguments.length?(h=0>=arguments.length?void 0:arguments[0],t):h},t.interval=function(){return arguments.length?(i=0>=arguments.length?void 0:arguments[0],t):i},t.intervalStep=function(){return arguments.length?(j=0>=arguments.length?void 0:arguments[0],t):j},t.unitInterval=function(){return arguments.length?(k=0>=arguments.length?void 0:arguments[0],t):k},t.unitIntervalStep=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],t):l},t.filter=function(){return arguments.length?(m=0>=arguments.length?void 0:arguments[0],t):m},t.volume=function(){return arguments.length?(n=g(0>=arguments.length?void 0:arguments[0]),t):n},c.rebindAll(t,o),t}a.randomFinancial=h,a.randomGeometricBrownianMotion=f,a.randomSkipWeekends=function(a){var b=a.date.getDay();return 0!==b&&6!==b},Object.defineProperty(a,"__esModule",{value:!0})});

@@ -6,2 +6,13 @@ # Change Log

# 3.1.0 (2020-03-19)
### Features
* add fill to webgl boxplot ([7ea7859](https://github.com/d3fc/d3fc/commit/7ea7859))
## [3.0.19](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-random-data@3.0.18...@d3fc/d3fc-random-data@3.0.19) (2019-11-28)

@@ -8,0 +19,0 @@

{
"name": "@d3fc/d3fc-random-data",
"version": "3.0.19",
"version": "3.1.0",
"description": "Components for generating random data series based on stochastic processes",

@@ -38,3 +38,3 @@ "license": "MIT",

},
"gitHead": "de82a1a109ddce4b5721fc4e0d2039ddd497817d"
"gitHead": "8a27597494353a1441a1a71ca06707d9e28c4381"
}
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