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

fluoro

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluoro - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

34

dist/context/modules.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Modules = void 0;
/* eslint import/no-dynamic-require: 0 */
/* eslint global-require: 0 */
const tools_1 = require("@kotori-bot/tools");
const tokens_1 = require("./tokens");

@@ -13,5 +10,28 @@ const service_1 = require("./service");

function handleConstructor(Class, ctx, config) {
(0, tools_1.none)(new Class(ctx, config));
/* eslint-disable-next-line no-new */
new Class(ctx, config);
}
const DEFAULT_MODULE_CONFIG = { filter: {} };
function isClass(obj, strict = true) {
if (typeof obj !== 'function')
return false;
const str = obj.toString();
if (obj.prototype === undefined)
return false;
if (obj.prototype.constructor !== obj)
return false;
if (str.slice(0, 5) === 'class')
return true;
if (Object.getOwnPropertyNames(obj.prototype).length >= 2)
return true;
if (/^function\s+\(|^function\s+anonymous\(/.test(str))
return false;
if (strict && /^function\s+[A-Z]/.test(str))
return true;
if (!/\b\(this\b|\bthis[.[]\b/.test(str))
return false;
if (!strict || /classCallCheck\(this/.test(str))
return true;
return /^function\sdefault_\d+\s*\(/.test(str);
}
class Modules {

@@ -32,3 +52,3 @@ ctx;

if (instance instanceof Function) {
if ((0, tools_1.isClass)(instance))
if (isClass(instance))
handleConstructor(instance, ctx, DEFAULT_MODULE_CONFIG);

@@ -43,3 +63,3 @@ else

injected(inject);
if (defaults && (0, tools_1.isClass)(defaults)) {
if (defaults && isClass(defaults)) {
const { inject: inject1 } = defaults;

@@ -50,3 +70,3 @@ if (inject1)

}
else if (defaults && !(0, tools_1.isClass)(defaults)) {
else if (defaults && !isClass(defaults)) {
handleFunction(defaults, ctx, config ?? DEFAULT_MODULE_CONFIG);

@@ -53,0 +73,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Service = void 0;
const tools_1 = require("@kotori-bot/tools");
class Service {

@@ -14,10 +13,8 @@ ctx;

}
start() {
return (0, tools_1.none)(this);
}
stop() {
return (0, tools_1.none)(this);
}
/* eslint-disable-next-line class-methods-use-this */
start() { }
/* eslint-disable-next-line class-methods-use-this */
stop() { }
}
exports.Service = Service;
exports.default = Service;
{
"name": "fluoro",
"version": "1.0.1",
"version": "1.0.2",
"description": "A Meta-Framework",
"main": "dist/index.js",
"scripts": {
"build": "tsc"
},
"license": "GPL-3.0",
"author": "Hotaru <biyuehuya@gmail.com>",
"bin": {
"kotori": "./bin.js"
},
"keywords": [

@@ -26,12 +26,9 @@ "meta-framework",

"bugs": {
"url": "https://github.com/kotorijs/kotori/issues"
"url": "https://github.com/biyuehu/fluoro/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kotorijs/kotori.git"
"url": "git+https://github.com/biyuehu/fluoro.git"
},
"homepage": "https://kotori.js.org",
"dependencies": {
"@kotori-bot/tools": "^1.3.0"
}
}
"homepage": "https://kotori.js.org"
}
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