
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@getevy/stately
Advanced tools
Stately is a headless library to help you build your Evy UI in Javascript or Typescript.
Stately provides methods for key actions in the lifecycle of insurance in the UI:
npm i @getevy/stately
import { Evy as Stately } from '@getevy/stately';
const stately = new Stately({ apiKey, apiURL });
The configuration is an object.
| Key | Required | Description |
|---|---|---|
| apiKey | yes | your API key |
| apiURL | no | the URL of the API to target |
stately is an EventEmitter. The methods are used to modify the state and request values from the Evy API. Once the data are up to date, events are triggered to allow you to update the UI.
During the initialization, stately will retrieve previous data from the local storage.
addProductFetches offers for a specific product.
Parameters
stately.addProduct(productId: string, price: number) => Promise<void>
| Parameter | Required | Description |
|---|---|---|
| productId | yes | ID of the product as provided to Evy |
| price | yes | Price of the product |
This method will emit OFFERS_LOADED when the offer data is retrieved from the server.
setAttachedOfferAttaches an offer to a product.
stately.setAttachedOffer(offerId: string, productId: string, quantity: number) => void
Parameters
| Parameter | Required | Description |
|---|---|---|
| offerId | yes | ID of the offer |
| productId | yes | ID of the product as provided to Evy |
| quantity | yes | Price of the product |
This method will emit ATTACH_OFFER when the offer data is attached and synchronized with the local storage.
getAttachedOffersProvides all the offers attached to products.
stately.getAttachedOffers() => Record<AttachedOfferIdentifier, AttachedOffer>
AttachedOffer
| Key | type | Description |
|---|---|---|
| offer | IOffer | The complete offer object |
| quantity | number | The number of times the offer is attached to the product |
clearOffersRemoves the offers attached on all the products.
stately.clearOffers() => void
cancelAttachedOfferRemoves the offers for a single product.
stately.cancelAttachedOffer(productId: string) => void
OFFERS_LOADEDThis event is triggered when the offers are updated.
ATTACH_OFFERThis event is triggered when an offer is attached to a product.
FAQs
The Javascript helper library to manage Evy offers
We found that @getevy/stately demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.