Socket
Socket
Sign inDemoInstall

core-decorators

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-decorators

Library of ES7 decorators inspired by languages that come with built-ins like @override, @deprecated, etc


Version published
Weekly downloads
69K
increased by11.57%
Maintainers
1
Weekly downloads
 
Created
Source

core-decorators.js

Library of ES7 decorators inspired by languages that come with built-ins like @override, @deprecated, etc

The idea is these decorators would be used to ensure code sanity, but would be removed in production builds via a Babel plugin.

import { override } from 'core-decorators';

class Parent {
  kickDog(first, second) {}
}

class Child extends Parent {
  @override
  kickDog() {}
  // SyntaxError: Parent#kickDog has two parameters but Child#kickDog has none
  //   > Parent#kickDog(first, second)
}

Keywords

FAQs

Package last updated on 13 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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