Sha256: fe9eaedb9f3a68786e34738d1d2dbd77e30543758d7c64052555c29baec62c18

Contents?: true

Size: 281 Bytes

Versions: 15

Compression:

Stored size: 281 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

15 entries across 15 versions & 1 rubygems

Version Path
logster-2.20.1 client-app/app/lib/decorators.js
logster-2.20.0 client-app/app/lib/decorators.js
logster-2.19.1 client-app/app/lib/decorators.js
logster-2.19.0 client-app/app/lib/decorators.js
logster-2.18.1 client-app/app/lib/decorators.js
logster-2.18.0 client-app/app/lib/decorators.js
logster-2.17.1 client-app/app/lib/decorators.js
logster-2.17.0 client-app/app/lib/decorators.js
logster-2.16.0 client-app/app/lib/decorators.js
logster-2.15.0 client-app/app/lib/decorators.js
logster-2.14.0 client-app/app/lib/decorators.js
logster-2.13.1 client-app/app/lib/decorators.js
logster-2.13.0 client-app/app/lib/decorators.js
logster-2.12.2 client-app/app/lib/decorators.js
logster-2.12.1 client-app/app/lib/decorators.js