Socket
Socket
Sign inDemoInstall

@shopify/decorators

Package Overview
Dependencies
0
Maintainers
12
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.2

10

CHANGELOG.md

@@ -10,4 +10,12 @@ # Changelog

## 1.0.1 - 2019-03-11
### Bug Fix
- fix the bug where `memoize` will only remember result once per property definition. It will now memoize per instance. ([#567](https://github.com/Shopify/quilt/pull/567))
## 1.0.0 - 2019-03-7
### Added
- `@shopify/decorators` package
- `@shopify/decorators` package with `memoize` decorator

14

dist/memoize.js

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

function memoize(resolver) {
return function (_target, _propertyKey, descriptor) {
return function (_target, propertyKey, descriptor) {
var method = descriptor.value;

@@ -12,4 +12,12 @@ if (!method || !(method instanceof Function)) {

}
descriptor.value = memoized(method, resolver);
return descriptor;
return {
get: function get() {
var newDescriptor = {
configurable: true,
value: memoized(method, resolver),
};
Object.defineProperty(this, propertyKey, newDescriptor);
return newDescriptor.value;
},
};
};

@@ -16,0 +24,0 @@ }

{
"name": "@shopify/decorators",
"version": "1.0.0",
"version": "1.0.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A set of decorators to aid your JavaScript journey.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc