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
2
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.2 to 3.0.3

17

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) :
(factory((global.fc = global.fc || {}),global.d3,global.d3));
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) :
(factory((global.fc = global.fc || {}),global.d3,global.d3));
}(this, (function (exports,d3Random,d3Time) { 'use strict';

@@ -138,2 +138,8 @@

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var financial = function () {

@@ -219,2 +225,7 @@ var startDate = new Date();

financial.stream = makeStream;
if (typeof Symbol !== 'function' || _typeof(Symbol.iterator) !== 'symbol') {
throw new Error('d3fc-random-data depends on Symbol. Make sure that you load a polyfill in older browsers. See README.');
}
financial[Symbol.iterator] = function () {

@@ -221,0 +232,0 @@ var stream = makeStream();

2

build/d3fc-random-data.min.js

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

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

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

<a name="3.0.3"></a>
## [3.0.3](https://github.com/d3fc/d3fc-random-data/compare/@d3fc/d3fc-random-data@3.0.2...@d3fc/d3fc-random-data@3.0.3) (2018-08-21)
### Bug Fixes
* incorrect check for Symbol support ([d293c71](https://github.com/d3fc/d3fc-random-data/commit/d293c71))
<a name="3.0.2"></a>

@@ -8,0 +19,0 @@ ## [3.0.2](https://github.com/d3fc/d3fc-random-data/compare/@d3fc/d3fc-random-data@3.0.1...@d3fc/d3fc-random-data@3.0.2) (2018-08-20)

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

@@ -31,6 +31,6 @@ "license": "MIT",

"devDependencies": {
"@d3fc/d3fc-scripts": "^2.0.2"
"@d3fc/d3fc-scripts": "^2.0.3"
},
"dependencies": {
"@d3fc/d3fc-rebind": "^5.0.2",
"@d3fc/d3fc-rebind": "^5.0.3",
"d3-random": "^1.0.0",

@@ -37,0 +37,0 @@ "d3-time": "^1.0.0"

@@ -79,2 +79,7 @@ import geometricBrownianMotion from './geometricBrownianMotion';

financial.stream = makeStream;
if (typeof Symbol !== 'function' || typeof Symbol.iterator !== 'symbol') {
throw new Error('d3fc-random-data depends on Symbol. Make sure that you load a polyfill in older browsers. See README.');
}
financial[Symbol.iterator] = () => {

@@ -81,0 +86,0 @@ const stream = makeStream();

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