
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@nuskin/ns-util
Advanced tools
Contentstack GraphQL calls.
import { contentstackService, util } from '@nuskin/ns-util';
/**
* getAEMConfig fetches the market config from contentstack.
* It will return null if an error occurs.
*
* @output null | {
* aws_url: "https://aws.test-url.com",
* checkout_client_id: "client-id",
* checkout_client_secret: "client-secret"
* }
*/
const aemConfig = await contentstackService.getAEMConfig();
/**
* getEquinoxMarkets will get the list of Equinox-enabled markets from contentstack.
*
* @output null | [
* {
* country_code: "CA",
* market_name: "Canada",
* store_id: "407"
* },
* {
* country_code: "US",
* market_name: "United States",
* store_id: "406"
* }
* ]
*/
const markets = await contentstackService.getEquinoxMarkets();
/**
* isMarketEnabled checks is the given market is in the list
* of equinox-enabled markets. It will return the market if found.
* Otherwise, returns null.
*
* @output null | {
* country_code: "CA",
* market_name: "Canada",
* store_id: "407"
* }
*/
const market = await contentstackService.isMarketEnabled(util.countryCode);
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';
/**
* getEnabledMarkets gets the list of enabled markets.
* Returns an object of MarketList if found. Otherwise,
* it will return null.
*
* @deprecated Use contentstack.getEquinoxMarkets
* @output null | {
* ca: { name: 'Canada', storeID: '423' },
* us: { name: 'United States', storeID: '422' }
* }
*/
const markets = equinoxLocalStorage.getEnabledMarkets();
/**
* getMarket gets a specific market from the list of equinox-enabled markets.
* Returns an object of Market if found.
*
* @deprecated Use contentstack.isMarketEnabled
* @output { name: 'United States', storeID: '422' }
*/
const market = equinoxLocalStorage.getMarket('us');
/**
* isEquinoxEnabled checks if the `isEquinoxEnabled` is in localstorage
* and the value is set to true.
*
* @output true | false
*/
const isEquinoxEnabled = equinoxLocalStorage.isEquinoxEnabled();
/**
* isMarketEnabled checks if the argument is in the list of enabled markets
* AND `isEquinoxEnabled` is set to true in localstorage.
*
* @deprecated Use contentstack.isMarketEnabled
* @output true | false
*/
const isMarketEnabled = equinoxLocalStorage.isMarketEnabled('us');
/**
* setEnabledMarkets saves the value in local storage.
* Returns a boolean that indicates whether the task is successful.
*
* @deprecated There is no need to set this locally
* @output true | false
*/
const isEnabledMarketsSaved = equinoxLocalStorage.setEnabledMarkets({
ca: { name: 'Canada', storeID: '423' },
us: { name: 'United States', storeID: '422' }
});
#contentstack #equinox #graphql #localstorage
FAQs
## Contentstack Contentstack GraphQL calls.
The npm package @nuskin/ns-util receives a total of 1,219 weekly downloads. As such, @nuskin/ns-util popularity was classified as popular.
We found that @nuskin/ns-util demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.