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 4.0.4 to 5.0.0

15

build/index.js

@@ -9,4 +9,5 @@ "use strict";

* file that was distributed with this source code.
*/
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Macroable = void 0;
/**

@@ -77,7 +78,9 @@ * Macroable is an abstract class to add ability to extend your class

static getter(name, callback, singleton = false) {
const wrappedCallback = singleton ? function wrappedCallback() {
const propName = `_${name}_`;
this[propName] = this[propName] || callback.bind(this)();
return this[propName];
} : callback;
const wrappedCallback = singleton
? function wrappedCallback() {
const value = callback.bind(this)();
Object.defineProperty(this, name, { value, configurable: true });
return value;
}
: callback;
this.getters[name] = wrappedCallback;

@@ -84,0 +87,0 @@ Object.defineProperty(this.prototype, name, {

21

CHANGELOG.md
<a name="2.0.2"></a>
## [2.0.2](https://github.com/poppinss/macroable/compare/2.0.1...2.0.2) (2019-03-23)
### Bug Fixes
* **type:** accept rest params as in MacroableFn ([e65ded2](https://github.com/poppinss/macroable/commit/e65ded2))
- **type:** accept rest params as in MacroableFn ([e65ded2](https://github.com/poppinss/macroable/commit/e65ded2))
<a name="2.0.1"></a>
<a name="2.0.1"></a>
## [2.0.1](https://github.com/poppinss/macroable/compare/2.0.0...2.0.1) (2019-02-02)
### Features
* **macroable:** expose static interface ([f3720ce](https://github.com/poppinss/macroable/commit/f3720ce))
- **macroable:** expose static interface ([f3720ce](https://github.com/poppinss/macroable/commit/f3720ce))
<a name="2.0.0"></a>
<a name="2.0.0"></a>
# 2.0.0 (2018-10-28)
### Features
* initial commit ([178584e](https://github.com/poppinss/macroable/commit/178584e))
* rewrite in typescript ([654b8c6](https://github.com/poppinss/macroable/commit/654b8c6))
- initial commit ([178584e](https://github.com/poppinss/macroable/commit/178584e))
- rewrite in typescript ([654b8c6](https://github.com/poppinss/macroable/commit/654b8c6))
{
"name": "macroable",
"version": "4.0.4",
"description": "A simple ES6 class that can be extended to provide macros and getters functionality",
"main": "build/index.js",
"files": [
"build/index.d.ts",
"build/index.js"
],
"scripts": {
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"test": "node japaFile.js",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile",
"commit": "git-cz",
"release": "np",
"version": "npm run build",
"lint": "eslint . --ext=.ts",
"prepublishOnly": "npm run build"
},
"keywords": [
"resetable"
],
"author": "amanvirk,adonisjs",
"license": "MIT",
"devDependencies": {
"@adonisjs/mrm-preset": "^2.3.0",
"@types/node": "^13.11.1",
"commitizen": "^4.0.4",
"cz-conventional-changelog": "^3.1.0",
"del-cli": "^3.0.0",
"eslint": "^6.8.0",
"eslint-plugin-adonis": "^1.0.9",
"husky": "^4.2.5",
"japa": "^3.0.1",
"mrm": "^2.2.1",
"np": "^5.2.1",
"ts-node": "^8.8.2",
"typescript": "^3.8.3"
},
"dependencies": {},
"nyc": {
"exclude": [
"test"
],
"extension": [
".ts"
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/poppinss/macroable.git"
},
"bugs": {
"url": "https://github.com/poppinss/macroable/issues"
},
"homepage": "https://github.com/poppinss/macroable#readme",
"husky": {
"hooks": {
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
}
},
"np": {
"contents": ".",
"anyBranch": false
}
"name": "macroable",
"version": "5.0.0",
"description": "A simple ES6 class that can be extended to provide macros and getters functionality",
"main": "build/index.js",
"files": [
"build/index.d.ts",
"build/index.js"
],
"scripts": {
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"test": "node japaFile.js",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile",
"commit": "git-cz",
"release": "np",
"version": "npm run build",
"lint": "eslint . --ext=.ts",
"prepublishOnly": "npm run build",
"format": "prettier --write ."
},
"keywords": [
"resetable"
],
"author": "amanvirk,adonisjs",
"license": "MIT",
"devDependencies": {
"@adonisjs/mrm-preset": "^2.3.6",
"@types/node": "^14.0.14",
"commitizen": "^4.1.2",
"cz-conventional-changelog": "^3.2.0",
"del-cli": "^3.0.1",
"eslint": "^7.4.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-adonis": "^1.0.14",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.2.5",
"japa": "^3.1.1",
"mrm": "^2.3.3",
"np": "^6.2.5",
"prettier": "^2.0.5",
"ts-node": "^8.10.2",
"typescript": "^3.9.6"
},
"dependencies": {},
"nyc": {
"exclude": [
"test"
],
"extension": [
".ts"
]
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/poppinss/macroable.git"
},
"bugs": {
"url": "https://github.com/poppinss/macroable/issues"
},
"homepage": "https://github.com/poppinss/macroable#readme",
"husky": {
"hooks": {
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
}
},
"np": {
"contents": ".",
"anyBranch": false
}
}
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