react-obsidian 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/graph/ObjectGraph.js +1 -1
- package/dist/src/graph/ObjectGraph.js.map +1 -1
- package/dist/src/{graph → utils}/autobind.d.ts +0 -0
- package/dist/src/utils/autobind.d.ts.map +1 -0
- package/dist/src/utils/autobind.js +19 -0
- package/dist/src/utils/autobind.js.map +1 -0
- package/package.json +1 -1
- package/src/graph/ObjectGraph.ts +1 -1
- package/src/{graph → utils}/autobind.ts +6 -1
- package/dist/src/graph/autobind.d.ts.map +0 -1
- package/dist/src/graph/autobind.js +0 -12
- package/dist/src/graph/autobind.js.map +0 -1
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.ObjectGraph = void 0;
|
|
16
16
|
var lodash_1 = require("lodash");
|
|
17
17
|
var Memoize_1 = __importDefault(require("../decorators/Memoize"));
|
|
18
|
-
var autobind_1 = require("
|
|
18
|
+
var autobind_1 = require("../utils/autobind");
|
|
19
19
|
var PropertyRetriever_1 = __importDefault(require("./PropertyRetriever"));
|
|
20
20
|
var ObjectGraph = /** @class */ (function () {
|
|
21
21
|
function ObjectGraph(_props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectGraph.js","sourceRoot":"","sources":["../../../src/graph/ObjectGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAkC;AAClC,kEAA4C;AAE5C,
|
|
1
|
+
{"version":3,"file":"ObjectGraph.js","sourceRoot":"","sources":["../../../src/graph/ObjectGraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iCAAkC;AAClC,kEAA4C;AAE5C,8CAA6C;AAE7C,0EAAoD;AAEpD;IAUE,qBAAsB,MAAU;QAAV,WAAM,GAAN,MAAM,CAAI;QAPxB,sBAAiB,GAAG,IAAI,2BAAiB,CAAC,IAAI,CAAC,CAAC;QAQtD,IAAA,mBAAQ,EAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IAND,sBAAI,6BAAI;aAAR;YACE,OAAO,IAAA,iBAAQ,EAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;;;OAAA;IAMD,8BAAQ,GAAR,UAAqB,QAAgB,EAAE,QAAkB;QACvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAA2B,CAAC;IACvF,CAAC;IAVD;QADC,IAAA,iBAAO,GAAE;;;2CAGT;IASH,kBAAC;CAAA,AAjBD,IAiBC;AAjBqB,kCAAW"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autobind.d.ts","sourceRoot":"","sources":["../../../src/utils/autobind.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAQnD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.autobind = void 0;
|
|
7
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
/* eslint-disable no-param-reassign */
|
|
9
|
+
function autobind(target) {
|
|
10
|
+
var methods = Object.getOwnPropertyNames(Object.getPrototypeOf(target));
|
|
11
|
+
methods
|
|
12
|
+
.filter(function (method) { return (method !== 'constructor'); })
|
|
13
|
+
.filter(function (method) { return lodash_1.default.isFunction(target[method]); })
|
|
14
|
+
.forEach(function (method) {
|
|
15
|
+
target[method] = target[method].bind(target);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.autobind = autobind;
|
|
19
|
+
//# sourceMappingURL=autobind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autobind.js","sourceRoot":"","sources":["../../../src/utils/autobind.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AAEvB,sCAAsC;AACtC,SAAgB,QAAQ,CAAC,MAA2B;IAClD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E,OAAO;SACJ,MAAM,CAAC,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,KAAK,aAAa,CAAC,EAA1B,CAA0B,CAAC;SAC9C,MAAM,CAAC,UAAC,MAAM,IAAK,OAAA,gBAAC,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAA5B,CAA4B,CAAC;SAChD,OAAO,CAAC,UAAC,MAAM;QACd,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC;AARD,4BAQC"}
|
package/package.json
CHANGED
package/src/graph/ObjectGraph.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { uniqueId } from 'lodash';
|
|
2
2
|
import Memoize from '../decorators/Memoize';
|
|
3
3
|
import { Scope } from '../types';
|
|
4
|
-
import { autobind } from '
|
|
4
|
+
import { autobind } from '../utils/autobind';
|
|
5
5
|
import { Graph } from './Graph';
|
|
6
6
|
import PropertyRetriever from './PropertyRetriever';
|
|
7
7
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
|
|
1
3
|
/* eslint-disable no-param-reassign */
|
|
2
4
|
export function autobind(target: Record<string, any>) {
|
|
3
5
|
const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(target));
|
|
4
6
|
methods
|
|
5
7
|
.filter((method) => (method !== 'constructor'))
|
|
6
|
-
.
|
|
8
|
+
.filter((method) => _.isFunction(target[method]))
|
|
9
|
+
.forEach((method) => {
|
|
10
|
+
target[method] = target[method].bind(target);
|
|
11
|
+
});
|
|
7
12
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autobind.d.ts","sourceRoot":"","sources":["../../../src/graph/autobind.ts"],"names":[],"mappings":"AACA,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAKnD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.autobind = void 0;
|
|
4
|
-
/* eslint-disable no-param-reassign */
|
|
5
|
-
function autobind(target) {
|
|
6
|
-
var methods = Object.getOwnPropertyNames(Object.getPrototypeOf(target));
|
|
7
|
-
methods
|
|
8
|
-
.filter(function (method) { return (method !== 'constructor'); })
|
|
9
|
-
.forEach(function (method) { target[method] = target[method].bind(target); });
|
|
10
|
-
}
|
|
11
|
-
exports.autobind = autobind;
|
|
12
|
-
//# sourceMappingURL=autobind.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autobind.js","sourceRoot":"","sources":["../../../src/graph/autobind.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,SAAgB,QAAQ,CAAC,MAA2B;IAClD,IAAM,OAAO,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E,OAAO;SACJ,MAAM,CAAC,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,KAAK,aAAa,CAAC,EAA1B,CAA0B,CAAC;SAC9C,OAAO,CAAC,UAAC,MAAM,IAAO,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5E,CAAC;AALD,4BAKC"}
|