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

dojo-core

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dojo-core - npm Package Compare versions

Comparing version 2.0.0-alpha.4 to 2.0.0-alpha.5

typings/dojo-core/dojo-core.d.ts

14

async/Task.js

@@ -18,2 +18,10 @@ var __extends = (this && this.__extends) || function (d, b) {

/**
* A type guard that determines if `value` is a `Task`
* @param value The value to guard
*/
function isTask(value) {
return Boolean(Promise_1.isThenable(value) && typeof value.cancel === 'function' && Array.isArray(value.children));
}
exports.isTask = isTask;
/**
* Task is an extension of Promise that supports cancelation.

@@ -57,3 +65,5 @@ */

Task.resolve = function (value) {
return _super.resolve.call(this, value);
return new this(function (resolve) {
resolve(value);
});
};

@@ -152,2 +162,2 @@ Task.copy = function (other) {

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFzay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hc3luYy9UYXNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7O0lBQUEsd0JBQStELFlBQVksQ0FBQyxDQUFBO0lBRS9ELGdCQUFRLEdBQVcsQ0FBQyxDQUFDO0lBRWxDOztPQUVHO0lBQ0g7UUFBcUMsd0JBQVU7UUEwQjlDLGNBQVksUUFBcUIsRUFBRSxRQUFxQjtZQTFCekQsaUJBbUtDO1lBeElDLGtCQUFNLFVBQUMsT0FBTyxFQUFFLE1BQU07Z0JBQ3JCLG1EQUFtRDtnQkFDbkQsUUFBUSxDQUNQLFVBQUMsS0FBSztvQkFDTCxFQUFFLENBQUMsQ0FBQyxLQUFJLENBQUMsTUFBTSxLQUFLLGdCQUFRLENBQUMsQ0FBQyxDQUFDO3dCQUM5QixNQUFNLENBQUM7b0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hdGUgPT09IFN0YXRlLlBlbmRpbmcpIHtcblx0XHRcdFx0dGhpcy5jYW5jZWwoKTtcblx0XHRcdH1cblx0XHRcdC8vIElmIHRhc2sncyBwYXJlbnQgaGFzIGJlZW4gcmVzb2x2ZWQsIHByb3BhZ2F0ZSBjYW5jZWxhdGlvbiB0byB0aGUgdGFzaydzIGRlc2NlbmRhbnRzXG5cdFx0XHRlbHNlIHtcblx0XHRcdFx0dGFzay5fY2FuY2VsKCk7XG5cdFx0XHR9XG5cdFx0fTtcblxuXHRcdC8vIEtlZXAgdHJhY2sgb2YgY2hpbGQgVGFza3MgZm9yIHByb3BvZ2F0aW5nIGNhbmNlbGF0aW9uIGJhY2sgZG93biB0aGUgY2hhaW5cblx0XHR0aGlzLmNoaWxkcmVuLnB1c2godGFzayk7XG5cblx0XHRyZXR1cm4gdGFzaztcblx0fVxuXG5cdGNhdGNoPFU+KG9uUmVqZWN0ZWQ6IChyZWFzb24/OiBFcnJvcikgPT4gKFUgfCBUaGVuYWJsZTxVPikpOiBUYXNrPFU+IHtcblx0XHRyZXR1cm4gPGFueT4gc3VwZXIuY2F0Y2gob25SZWplY3RlZCk7XG5cdH1cblxufVxuIl19

30

package.json
{
"name": "dojo-core",
"version": "2.0.0-alpha.4",
"version": "2.0.0-alpha.5",
"description": "Basic utilites for common TypeScript development",

@@ -17,22 +17,22 @@ "homepage": "http://dojotoolkit.org",

"codecov.io": "0.1.6",
"dojo-loader": "2.0.0-beta.2",
"dts-generator": "1.7.0",
"dojo-loader": "2.0.0-beta.4",
"dts-generator": "^1.7.0",
"formidable": "1.0.17",
"glob": "7.0.3",
"glob": "^7.0.3",
"grunt": "0.4.5",
"grunt-contrib-clean": "1.0.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-watch": "1.0.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-text-replace": "0.4.0",
"grunt-ts": "5.5.0-beta.2",
"grunt-tslint": "3.0.3",
"grunt-ts": "^5.0.0",
"grunt-tslint": "^3.1.0",
"http-proxy": "0.10.3",
"intern": "3.1.1",
"istanbul": "0.4.2",
"remap-istanbul": "0.5.1",
"intern": "~3.1.1",
"istanbul": "0.4.3",
"remap-istanbul": "0.6.3",
"sinon": "1.14.1",
"tslint": "3.7.1",
"typescript": "1.8.9"
"tslint": "^3.8.1",
"typescript": "~1.8.10"
},
"typings": "typings/dojo-core/dojo-core-2.0.0-alpha.4.d.ts"
"typings": "typings/dojo-core/dojo-core-2.0.0-alpha.5.d.ts"
}

@@ -23,9 +23,2 @@ (function (factory) {

var version = '2.0.0-pre';
function normalizeHeaders(headers) {
var normalizedHeaders = {};
for (var key in headers) {
normalizedHeaders[key.toLowerCase()] = headers[key];
}
return normalizedHeaders;
}
function node(url, options) {

@@ -41,3 +34,3 @@ if (options === void 0) { options = {}; }

ciphers: options.ciphers,
headers: normalizeHeaders(options.headers || {}),
headers: options.headers || {},
host: parsedUrl.host,

@@ -198,2 +191,2 @@ hostname: parsedUrl.hostname,

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZXF1ZXN0L25vZGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0lBQUEscUJBQWlCLGVBQWUsQ0FBQyxDQUFBO0lBQ2pDLG9DQUFnQyw4QkFBOEIsQ0FBQyxDQUFBO0lBRS9ELElBQVksSUFBSSxXQUFNLE1BQU0sQ0FBQyxDQUFBO0lBQzdCLElBQVksS0FBSyxXQUFNLE9BQU8sQ0FBQyxDQUFBO0lBQy9CLHFCQUE2QixTQUFTLENBQUMsQ0FBQTtJQUV2Qyx5Q0FBcUMsOENBQThDLENBQUMsQ0FBQTtJQUNwRix1Q0FBbUMsNENBQTRDLENBQUMsQ0FBQTtJQUNoRiwrQk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cmVqZWN0KGVycm9yKTtcblx0XHRcdFx0fSwgb3B0aW9ucy50aW1lb3V0KTtcblxuXHRcdFx0XHRyZXR1cm4gY3JlYXRlSGFuZGxlKGZ1bmN0aW9uICgpOiB2b2lkIHtcblx0XHRcdFx0XHRjbGVhclRpbWVvdXQodGltZXIpO1xuXHRcdFx0XHR9KTtcblx0XHRcdH0pKCk7XG5cdFx0fVxuXHR9LCBmdW5jdGlvbiAoKSB7XG5cdFx0cmVxdWVzdC5hYm9ydCgpO1xuXHR9KS5jYXRjaChmdW5jdGlvbiAoZXJyb3I6IEVycm9yKTogYW55IHtcblx0XHRsZXQgcGFyc2VkVXJsID0gdXJsVXRpbC5wYXJzZSh1cmwpO1xuXG5cdFx0aWYgKHBhcnNlZFVybC5hdXRoKSB7XG5cdFx0XHRwYXJzZWRVcmwuYXV0aCA9ICcocmVkYWN0ZWQpJztcblx0XHR9XG5cblx0XHRsZXQgc2FuaXRpemVkVXJsID0gdXJsVXRpbC5mb3JtYXQocGFyc2VkVXJsKTtcblxuXHRcdGVycm9yLm1lc3NhZ2UgPSAnWycgKyByZXF1ZXN0T3B0aW9ucy5tZXRob2QgKyAnICcgKyBzYW5pdGl6ZWRVcmwgKyAnXSAnICsgZXJyb3IubWVzc2FnZTtcblx0XHR0aHJvdyBlcnJvcjtcblx0fSk7XG5cblx0cmV0dXJuIHByb21pc2U7XG59XG4iXX0=
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