ns-util
Kindly add a basic usage here after you've created a utility.
Contentstack
Contentstack GraphQL calls.
import { contentstackService, util } from '@nuskin/ns-util';
const aemConfig = await contentstackService.getAEMConfig();
const markets = await contentstackService.getEquinoxMarkets();
const market = await contentstackService.isMarketEnabled(util.countryCode);
Equinox Local Storage Usage
Equinox Local Storage utilities. It is used in the following projects:
Note: deprecated functions will be removed in the next major release.
import { equinoxLocalStorage } from '@nuskin/ns-util';
const markets = equinoxLocalStorage.getEnabledMarkets();
const market = equinoxLocalStorage.getMarket('us');
const isEquinoxEnabled = equinoxLocalStorage.isEquinoxEnabled();
const isMarketEnabled = equinoxLocalStorage.isMarketEnabled('us');
const isEnabledMarketsSaved = equinoxLocalStorage.setEnabledMarkets({
ca: { name: 'Canada', storeID: '423' },
us: { name: 'United States', storeID: '422' }
});
Tags
#contentstack #equinox #graphql #localstorage