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

@automapper/classes

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automapper/classes - npm Package Compare versions

Comparing version 1.0.0-beta.9 to 1.0.0

6

package.json
{
"name": "@automapper/classes",
"version": "1.0.0-beta.9",
"version": "1.0.0",
"peerDependencies": {
"reflect-metadata": "~0.1.13",
"@automapper/core": "1.0.0-beta.9",
"@automapper/types": "1.0.0-beta.9"
"@automapper/core": "1.0.0",
"@automapper/types": "1.0.0"
},

@@ -9,0 +9,0 @@ "sideEffects": false,

@@ -6,2 +6,2 @@ /**

*/
export declare function isClass(fn: unknown): boolean;
export declare function isClass(fn: Function): boolean;

@@ -9,13 +9,15 @@ "use strict";

*/
// eslint-disable-next-line @typescript-eslint/ban-types
function isClass(fn) {
var _a;
var _a, _b;
const typeOfFn = typeof fn;
const constructorFnString = (_a = fn.constructor) === null || _a === void 0 ? void 0 : _a.toString();
return ((typeOfFn === 'object' || typeOfFn === 'function') &&
fn.constructor &&
(/^\s*function/.test(constructorFnString) ||
/^\s*class/.test(constructorFnString)) &&
constructorFnString.includes(fn.constructor.name));
const fnString = fn.toString();
const constructorFnString = (_b = (_a = fn.prototype) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.toString();
return (typeOfFn === 'function' &&
!!constructorFnString &&
(/^\s*function/.test(fnString) || /^\s*class/.test(fnString)) &&
!!fn.name &&
fnString.includes(fn.name));
}
exports.isClass = isClass;
//# sourceMappingURL=is-class.util.js.map

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