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

dob

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dob - npm Package Compare versions

Comparing version 2.3.9 to 2.3.10

built/tests/debug.test.js

1

built/atom.js

@@ -71,2 +71,3 @@ "use strict";

this.isBeingTracked = false;
this.reactions.clear();
this.onBecomeUnobservedHandler();

@@ -73,0 +74,0 @@ }

8

built/demos/atom/index.js

@@ -66,3 +66,3 @@ "use strict";

function fetchName(name) {
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return __awaiter(this, void 0, void 0, regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -87,3 +87,3 @@ while (1) {

function fetchAge(age) {
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
return __awaiter(this, void 0, void 0, regeneratorRuntime.mark(function _callee2() {
return regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -118,3 +118,3 @@ while (1) {

this.name = computed_async_1.computedAsync("", function () {
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
return __awaiter(_this, void 0, void 0, regeneratorRuntime.mark(function _callee3() {
return regeneratorRuntime.wrap(function _callee3$(_context3) {

@@ -139,3 +139,3 @@ while (1) {

this.age = computed_async_1.computedAsync("", function () {
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
return __awaiter(_this, void 0, void 0, regeneratorRuntime.mark(function _callee4() {
return regeneratorRuntime.wrap(function _callee4$(_context4) {

@@ -142,0 +142,0 @@ while (1) {

@@ -66,3 +66,3 @@ "use strict";

return function (dispatch, getState) {
return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return __awaiter(_this, void 0, void 0, regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -69,0 +69,0 @@ while (1) {

@@ -23,3 +23,3 @@ "use strict";

if (utils_1.isPrimitive(obj)) {
throw Error(obj + " \u662F\u57FA\u672C\u7C7B\u578B\uFF0Cdob \u4EC5\u652F\u6301\u975E\u57FA\u672C\u7C7B\u578B");
throw TypeError(obj + " \u662F\u57FA\u672C\u7C7B\u578B\uFF0Cdob \u4EC5\u652F\u6301\u975E\u57FA\u672C\u7C7B\u578B");
}

@@ -26,0 +26,0 @@ if (utils_1.globalState.proxies.has(obj)) {

@@ -27,2 +27,7 @@ "use strict";

_createClass(Clock, [{
key: "stopAtom",
value: function stopAtom() {
this.atom.unobserve();
}
}, {
key: "getTime",

@@ -63,2 +68,15 @@ value: function getTime() {

});
ava_1.default("unobservable", function (t) {
var time = 0;
var clock = new Clock();
index_1.observe(function () {
time = clock.getTime();
});
clock.startTicking();
clock.startTicking();
clock.stopAtom();
return Promise.resolve().then(function () {
return t.true(time === 4);
});
});
//# sourceMappingURL=atom.test.js.map

@@ -81,2 +81,12 @@ "use strict";

});
ava_1.default("null throw typeError", function (t) {
t.throws(function () {
index_1.observable(null);
}, TypeError);
});
ava_1.default("undefined not throw", function (t) {
t.notThrows(function () {
index_1.observable(undefined);
});
});
/**

@@ -271,3 +281,3 @@ * isObservable

value: function run(num) {
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return __awaiter(this, void 0, void 0, regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {

@@ -998,3 +1008,3 @@ while (1) {

index_1.Action(function () {
return __awaiter(undefined, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
return __awaiter(undefined, void 0, void 0, regeneratorRuntime.mark(function _callee2() {
return regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -1042,3 +1052,3 @@ while (1) {

index_1.Action(function () {
return __awaiter(undefined, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
return __awaiter(undefined, void 0, void 0, regeneratorRuntime.mark(function _callee3() {
return regeneratorRuntime.wrap(function _callee3$(_context3) {

@@ -1045,0 +1055,0 @@ while (1) {

{
"name": "dob",
"version": "2.3.9",
"version": "2.3.10",
"description": "",

@@ -54,8 +54,7 @@ "main": "built/index.js",

"typescript": "^2.4.1",
"webpack": "^3.3.0"
"webpack": "^3.3.0",
"react": "^15.6.1"
},
"dependencies": {
"immutable": "^3.8.1",
"lodash": "^4.17.4",
"react": "^15.6.1",
"redux": "^3.7.2"

@@ -62,0 +61,0 @@ },

@@ -61,4 +61,5 @@ import { endBatch, runReactionAsync, startBatch } from "./observer"

this.isBeingTracked = false
this.reactions.clear()
this.onBecomeUnobservedHandler()
}
}

@@ -19,3 +19,3 @@ import builtIns from "./built-ins"

if (isPrimitive(obj)) {
throw Error(`${obj} 是基本类型,dob 仅支持非基本类型`)
throw TypeError(`${obj} 是基本类型,dob 仅支持非基本类型`)
}

@@ -22,0 +22,0 @@

@@ -16,2 +16,6 @@ import test from "ava"

public stopAtom() {
this.atom.unobserve()
}
public getTime() {

@@ -47,1 +51,16 @@ this.atom.reportObserved()

})
test("unobservable", t => {
let time: number = 0
const clock = new Clock()
observe(() => {
time = clock.getTime()
})
clock.startTicking()
clock.startTicking()
clock.stopAtom()
return Promise.resolve()
.then(() => t.true(time === 4))
})

@@ -42,2 +42,14 @@ import test from "ava"

test("null throw typeError", t => {
t.throws(() => {
observable(null)
}, TypeError)
})
test("undefined not throw", t => {
t.notThrows(() => {
observable(undefined)
})
})
/**

@@ -44,0 +56,0 @@ * isObservable

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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