diff --git a/features.js b/features.js index 13cf58a..6c54799 100755 --- a/features.js +++ b/features.js @@ -898,11 +898,27 @@ var FeatureSetProto = { // -> actions // // - // This will add .unapplicable to the output of .buildFeatureList(..) - // and to .features of the resulting object... + // This will set .features on the object. + // + // .features format: + // { + // // the current feature set object... + // FeatureSet: feature-set, + // + // // list of features not applicable in current context... + // // + // // i.e. the features that defined .isApplicable(..) and it + // // returned false when called. + // unapplicable: [ feature-tag, .. ], + // + // // output of .buildFeatureList(..)... + // ... + // } // // NOTE: this will store the build result in .features of the output // actions object. + // NOTE: .features is reset even if a FeatureLinearizationError error + // is thrown. setup: function(obj, lst){ // no explicit object is given... if(lst == null){ @@ -954,6 +970,8 @@ var FeatureSetProto = { && console.error('Hit loop limit while sorting dependencies!') } + features.FeatureSet = this + obj.features = features // fatal error -- can't load... diff --git a/package.json b/package.json index 9e6d20a..19f7a86 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-features", - "version": "3.1.11", + "version": "3.2.0", "description": "", "main": "features.js", "scripts": {