Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cocktail

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cocktail - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

8

CHANGELOG.md
##CHANGE LOG
- 0.5.2
- status: Alpha
- Fixed issue with `@properties` annotation to not override value when subject is an object and it has a property already defined with the same name. See #18.
- 0.5.1
- status: Alpha
- Added 'module' as parameter in `@as` pseudo-annotation to export module as single object
- 0.5.0

@@ -4,0 +12,0 @@ - status: Alpha

11

lib/processor/annotation/Properties.js

@@ -42,6 +42,7 @@ /*

_createPropertyFor: function(subject, name, value){
_createPropertyFor: function(subject, name, value, doNotOverride){
//is it better to use __defineGetter__ here???
subject[name] = value;
if (typeof subject[name] === 'undefined' || doNotOverride !== true) {
subject[name] = value;
}
subject[this._getterName(name, value)] = function(){

@@ -57,2 +58,3 @@ return this[name];

var properties = this.getParameter(),
isObject = !(subject.prototype),
key;

@@ -62,5 +64,4 @@

if(properties.hasOwnProperty(key)){
this._createPropertyFor(subject.prototype || subject, key, properties[key]);
this._createPropertyFor(subject.prototype || subject, key, properties[key], isObject);
}
}

@@ -67,0 +68,0 @@ }

{
"name": "cocktail",
"description": "CocktailJS is a small library to explore traits, talents, inheritance and annotations concepts in nodejs - Shake your objects and classes with Cocktail!",
"version": "0.5.1",
"version": "0.5.2",
"homepage": "http://cocktailjs.github.io",

@@ -32,5 +32,4 @@ "author": {

"grunt-simple-mocha": "~0.4",
"chai": "1.9.1",
"mocha": "1.18.2",
"grunt-mocha": "0.4.10",
"chai": "~1.9",
"mocha": "~1.19",
"grunt-contrib-jshint": "~0.10",

@@ -40,4 +39,5 @@ "grunt-contrib-watch": "~0.6",

"sinon-chai": "~2.5",
"sinon": "~1.9",
"grunt-cli": "~0.1.13"
"sinon": "~1.10",
"grunt-cli": "~0.1.13",
"grunt-mocha-test": "~0.10.2"
},

@@ -44,0 +44,0 @@ "keywords": [

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