Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@astro-my/featuretoggle

Package Overview
Dependencies
Maintainers
8
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astro-my/featuretoggle - npm Package Compare versions

Comparing version
2.1.0
to
2.1.1
+1
-1
lib/index.js

@@ -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

{
"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",

@@ -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 @@ }