@astro-my/featuretoggle
Advanced tools
+1
-1
@@ -1,2 +0,2 @@ | ||
| 'use strict';function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}var featureStore=require('./services/featureStore'),get=function(){var a=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function a(b){var c;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(console.log(b),console.log(Array.isArray(b)),a.prev=2,!Array.isArray(b)){a.next=9;break}return a.next=6,featureStore.getRecords(b);case 6:a.t0=a.sent,a.next=12;break;case 9:return a.next=11,featureStore.getRecord(b);case 11:a.t0=a.sent;case 12:return c=a.t0,a.abrupt('return',c);case 16:return a.prev=16,a.t1=a['catch'](2),console.log(a.t1),a.abrupt('return',void 0);case 20:case'end':return a.stop();}},a,void 0,[[2,16]])}));return function(){return a.apply(this,arguments)}}();/* | ||
| 'use strict';function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}var featureStore=require('./services/featureStore'),get=function(){var a=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function a(b){var c;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(a.prev=0,!Array.isArray(b)){a.next=7;break}return a.next=4,featureStore.getRecords(b);case 4:a.t0=a.sent,a.next=10;break;case 7:return a.next=9,featureStore.getRecord(b);case 9:a.t0=a.sent;case 10:return c=a.t0,a.abrupt('return',c);case 14:return a.prev=14,a.t1=a['catch'](0),a.abrupt('return',void 0);case 17:case'end':return a.stop();}},a,void 0,[[0,14]])}));return function(){return a.apply(this,arguments)}}();/* | ||
| * Get feature flag | ||
@@ -3,0 +3,0 @@ * @param {String} or {Array} featureId The featureId to be retrieved from feature store |
+1
-1
| { | ||
| "name": "@astro-my/featuretoggle", | ||
| "version": "2.1.0", | ||
| "version": "2.1.1", | ||
| "description": "Retrieve feature flags status for services or portal", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
+0
-3
@@ -9,4 +9,2 @@ const featureStore = require('./services/featureStore'); | ||
| const get = async (featureId) => { | ||
| console.log(featureId); | ||
| console.log(Array.isArray(featureId)); | ||
| try { | ||
@@ -18,3 +16,2 @@ const received = Array.isArray(featureId) | ||
| } catch (err) { | ||
| console.log(err); | ||
| return undefined; | ||
@@ -21,0 +18,0 @@ } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
13076
-1.16%127
-2.31%