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

dask

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dask - npm Package Compare versions

Comparing version 1.0.0-dev.201704271746 to 1.0.0-dev.201705040952

39

dask.js

@@ -7,6 +7,27 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.dask = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

const isFunction_1 = require("lodash-ts/isFunction");
class Deferred extends Promise {
constructor() {
let rs = null;
let rj = null;
super((resolve, reject) => {
rs = resolve;
rj = reject;
});
this.resolve = rs;
this.reject = rj;
this.fullfiled = false;
}
}
async function get(dsk, result /* | string[]*/, funcs) {
const cache = {};
return await _get(dsk, result, cache, funcs);
}
exports.get = get;
async function _get(dsk, result /* | string[]*/, cache, funcs) {
const v = dsk[result];
// console.log(`*********${result}**********`);
// console.info(dsk);
if (result in cache) {
return await cache[result];
}
const deferred = new Deferred();
cache[result] = deferred;
if (isObject_1.default(v)) {

@@ -19,5 +40,7 @@ const keys = Object.keys(v);

const args = (v[fun_name] || []);
return await fun.apply(null, await Promise.all(args.map((arg) => {
return get(dsk, arg, funcs);
const val = await fun.apply(null, await Promise.all(args.map((arg) => {
return _get(dsk, arg, cache, funcs);
})));
deferred.resolve(val);
return val;
}

@@ -30,9 +53,11 @@ }

if (d) {
return await get(dsk, v, funcs);
const val = await _get(dsk, v, cache, funcs);
deferred.resolve(val);
return val;
}
}
}
return await v;
deferred.resolve(v);
return Promise.resolve(v);
}
exports.get = get;

@@ -39,0 +64,0 @@ },{"lodash-ts/isFunction":3,"lodash-ts/isObject":4,"lodash-ts/isString":6}],2:[function(require,module,exports){

@@ -6,6 +6,27 @@ "use strict";

const isFunction_1 = require("lodash-ts/isFunction");
class Deferred extends Promise {
constructor() {
let rs = null;
let rj = null;
super((resolve, reject) => {
rs = resolve;
rj = reject;
});
this.resolve = rs;
this.reject = rj;
this.fullfiled = false;
}
}
async function get(dsk, result /* | string[]*/, funcs) {
const cache = {};
return await _get(dsk, result, cache, funcs);
}
exports.get = get;
async function _get(dsk, result /* | string[]*/, cache, funcs) {
const v = dsk[result];
// console.log(`*********${result}**********`);
// console.info(dsk);
if (result in cache) {
return await cache[result];
}
const deferred = new Deferred();
cache[result] = deferred;
if (isObject_1.default(v)) {

@@ -18,5 +39,7 @@ const keys = Object.keys(v);

const args = (v[fun_name] || []);
return await fun.apply(null, await Promise.all(args.map((arg) => {
return get(dsk, arg, funcs);
const val = await fun.apply(null, await Promise.all(args.map((arg) => {
return _get(dsk, arg, cache, funcs);
})));
deferred.resolve(val);
return val;
}

@@ -29,8 +52,10 @@ }

if (d) {
return await get(dsk, v, funcs);
const val = await _get(dsk, v, cache, funcs);
deferred.resolve(val);
return val;
}
}
}
return await v;
deferred.resolve(v);
return Promise.resolve(v);
}
exports.get = get;

2

package.json
{
"name": "dask",
"version": "1.0.0-dev.201704271746",
"version": "1.0.0-dev.201705040952",
"description": "Task schadule in JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

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