Socket
Socket
Sign inDemoInstall

macroable

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

macroable - npm Package Compare versions

Comparing version 6.0.1 to 6.0.2

6

build/index.d.ts

@@ -43,3 +43,3 @@ /**

};
constructor();
constructor(..._: any[]);
/**

@@ -58,3 +58,3 @@ * Add a macro to the class. This method is a better to manually adding

*/
static macro<T extends any>(name: string, callback: MacroFn<T, any[], any>): void;
static macro<T extends typeof Macroable>(this: T, name: string, callback: MacroFn<InstanceType<T>, any[], any>): void;
/**

@@ -88,3 +88,3 @@ * Return the existing macro or null if it doesn't exists

*/
static getter<T extends any = any>(name: string, callback: GetterFn<T, any>, singleton?: boolean): void;
static getter<T extends typeof Macroable>(this: T, name: string, callback: GetterFn<InstanceType<T>, any>, singleton?: boolean): void;
/**

@@ -91,0 +91,0 @@ * Return the existing getter or null if it doesn't exists

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

class Macroable {
constructor() {
constructor(..._) {
if (!this.constructor['macros'] || !this.constructor['getters']) {

@@ -25,0 +25,0 @@ throw new Error('Set static properties "macros = {}" and "getters = {}" on the class for the macroable to work.');

{
"name": "macroable",
"version": "6.0.1",
"version": "6.0.2",
"description": "A simple ES6 class that can be extended to provide macros and getters functionality",

@@ -31,5 +31,5 @@ "main": "build/index.js",

"devDependencies": {
"@adonisjs/mrm-preset": "^5.0.2",
"@adonisjs/mrm-preset": "^5.0.3",
"@adonisjs/require-ts": "^2.0.10",
"@types/node": "^17.0.19",
"@types/node": "^17.0.22",
"commitizen": "^4.2.4",

@@ -39,4 +39,4 @@ "cz-conventional-changelog": "^3.3.0",

"doctoc": "^2.1.0",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.4.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-adonis": "^2.1.0",

@@ -47,6 +47,6 @@ "eslint-plugin-prettier": "^4.0.0",

"japa": "^4.0.0",
"mrm": "^3.0.10",
"np": "^7.6.0",
"prettier": "^2.5.1",
"typescript": "^4.5.5"
"mrm": "^4.0.0",
"np": "^7.6.1",
"prettier": "^2.6.0",
"typescript": "^4.6.2"
},

@@ -53,0 +53,0 @@ "nyc": {

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