Sha256: 21d25afdd00a60afe20a6c3b78cbf40c03deec006c34f7f7a1e6fc2e2defa75d

Contents?: true

Size: 262 Bytes

Versions: 23

Compression:

Stored size: 262 Bytes

Contents

export function bound(target, key, desc) {
  const orig = desc.value;
  const boundKey = `_${key}Bound`;
  return {
    get() {
      if (this[boundKey]) return this[boundKey];
      this.set(boundKey, orig.bind(this));
      return this[boundKey];
    }
  };
}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
logster-2.11.4 client-app/app/lib/decorators.js
logster-2.11.3 client-app/app/lib/decorators.js
logster-2.11.2 client-app/app/lib/decorators.js
logster-2.11.1 client-app/app/lib/decorators.js
logster-2.11.0 client-app/app/lib/decorators.js
logster-2.10.1 client-app/app/lib/decorators.js
logster-2.10.0 client-app/app/lib/decorators.js
logster-2.9.8 client-app/app/lib/decorators.js
logster-2.9.7 client-app/app/lib/decorators.js
logster-2.9.6 client-app/app/lib/decorators.js
logster-2.9.5 client-app/app/lib/decorators.js
logster-2.9.4 client-app/app/lib/decorators.js
logster-2.9.3 client-app/app/lib/decorators.js
logster-2.9.2 client-app/app/lib/decorators.js
logster-2.9.1 client-app/app/lib/decorators.js
logster-2.9.0 client-app/app/lib/decorators.js
logster-2.8.0 client-app/app/lib/decorators.js
logster-2.7.1 client-app/app/lib/decorators.js
logster-2.7.0 client-app/app/lib/decorators.js
logster-2.6.3 client-app/app/lib/decorators.js