Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Javascript Class implementation for node.js
npm install ee-class
var Class = require( "ee-class" );
var LifeForm = new Class( {
isAlive: false
, init: function( options ){
this.isAlive = !!options.isAlive;
}
} );
var Human = new Class( {
inherits: LifeForm
, name: ""
// pay attention to give the function a name so you can reference it when you are calling the parent function
, init: function myInitFunction( options ){
myInitFunction.parent( options );
this.name = options.name;
}
} );
var Boy = new Class( {
inherits: Human
, age: 0
// pay attention to give the function a name so you can reference it when you are calling the parent function
, init: function myInitFunction( options ){
myInitFunction.parent( options );
if ( options.age > 18 ) throw new Error( "Too old to be a boy!" )
this.age = options.age;
}
, describe: function(){
console.log( "Hi, my name is %s, i'm %s years old and i'm " + ( this.isAlive ? "alive :)" : "dead :(" ), this.name, this.age );
}
} );
var fabian = new Boy( {
name: "fabian"
, age: 15
, isAlive: true
} );
fabian.describe(); // Hi, my name is fabian, i'm 15 years old and i'm alive :)
FAQs
Fast prototype based javascript classes
The npm package ee-class receives a total of 3,048 weekly downloads. As such, ee-class popularity was classified as popular.
We found that ee-class 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.