🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

api-core-js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-core-js - npm Package Compare versions

Comparing version
0.0.12
to
0.0.15
+2
-1
lib/decorator/api-decorator.js

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

const isApiService = (object) => {
var _a;
if (!object)

@@ -76,3 +77,3 @@ return false;

return object.prototype[__api_service__] === __api_service__;
return Reflect.getPrototypeOf(object)[__api_service__] === __api_service__;
return ((_a = Reflect.getPrototypeOf(object)) === null || _a === void 0 ? void 0 : _a[__api_service__]) === __api_service__;
};

@@ -79,0 +80,0 @@ exports.isApiService = isApiService;

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

const isFieldable = (object) => {
var _a;
if (!object)

@@ -68,8 +69,9 @@ return false;

return object.prototype[__object_field__] === __object_field__;
return Reflect.getPrototypeOf(object)[__object_field__] === __object_field__;
return ((_a = Reflect.getPrototypeOf(object)) === null || _a === void 0 ? void 0 : _a[__object_field__]) === __object_field__;
};
const __field_mapping__ = Symbol('__field_mapping__'); //私有标记
const fieldMapping = (object) => {
var _a;
compileFieldMeatada(object);
return Reflect.getPrototypeOf(object)[__field_mapping__] || null;
return ((_a = Reflect.getPrototypeOf(object)) === null || _a === void 0 ? void 0 : _a[__field_mapping__]) || null;
};

@@ -79,4 +81,5 @@ exports.fieldMapping = fieldMapping;

const fieldNames = (object) => {
var _a;
compileFieldMeatada(object);
return Reflect.getPrototypeOf(object)[__field_names__] || null;
return ((_a = Reflect.getPrototypeOf(object)) === null || _a === void 0 ? void 0 : _a[__field_names__]) || null;
};

@@ -83,0 +86,0 @@ exports.fieldNames = fieldNames;

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

const isServlet = (obj) => {
var _a;
if (!obj)

@@ -34,3 +35,3 @@ return false;

return obj.prototype[__servlet__] === __servlet__;
return Reflect.getPrototypeOf(obj)[__servlet__] === __servlet__;
return ((_a = Reflect.getPrototypeOf(obj)) === null || _a === void 0 ? void 0 : _a[__servlet__]) === __servlet__;
};

@@ -37,0 +38,0 @@ exports.isServlet = isServlet;

{
"name": "api-core-js",
"version": "0.0.12",
"version": "0.0.15",
"description": "api core",
"main": "./lib/index.js",
"types": "./lib/typings/index.d.ts",
"repository": "https://github.com/yshiliang/api-core-js.git",
"repository": "https://gitee.com/sliangee/st-api-core-js.git",
"author": "y.liang",

@@ -9,0 +9,0 @@ "license": "MIT",