
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
core-decorators
Advanced tools
Library of ES7 decorators inspired by languages that come with built-ins like @override, @deprecated, etc
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: Child#kickDog() does not properly override Parent#kickDog(first, second)
}
// or
class Child extends Parent {
@override
kickDogs() {}
// SyntaxError: No descriptor matching Child#kickDogs() was found on the prototype chain.
//
// Did you mean "kickDog"?
}
import { deprecated } from 'core-decorators';
class Person {
@deprecated
kickDog() {}
@deprecated('We stopped animal abuse')
kickDogHard() {}
@deprecated('We stopped animal abuse', { url: 'http://humanesociety.org/issues/abuse_neglect/' })
kickDogHarder() {}
}
let person = new Person();
person.kickDog();
// DEPRECATION Person#kickDog: This function is deprecated and will be removed in future versions.
person.kickDogHard();
// DEPRECATION Person#kickDogHard: We stopped animal abuse
person.kickDogHarder();
// DEPRECATION Person#kickDogHarder: We stopped animal abuse
//
// See http://humanesociety.org/issues/abuse_neglect/ for more details.
//
FAQs
Library of JavaScript stage-0 decorators (aka ES2016/ES7 decorators but that's not accurate!) inspired by languages that come with built-ins like @override, @deprecate, @autobind, @mixin and more! Works great with React/Angular/more!
The npm package core-decorators receives a total of 30,896 weekly downloads. As such, core-decorators popularity was classified as popular.
We found that core-decorators demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.