
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@naper/embed-components
Advanced tools
A JavaScript library to embed product category data into web pages using Web Components.
<script async="async" type="module">
import { NaperComponents } from 'https://unpkg.com/@naper/embed-components@1/dist/app.js';
// Library configuration
</script>
npm install @naper/embed-components
Before using the components, you must initialize the library with your settings:
import { NaperComponents } from '@naper/embed-components';
NaperComponents.init({
store: 'https://your-store.naper.ai/',
integration: {
type: 'vtex', // or 'shopify'
name: 'production' // your integration name
}
});
/
)'vtex'
or 'shopify'
)<category-data>
Displays specific data of a product category.
data-external-id
)data-path
)data-key
)name
: Category namedescription
: Short category descriptionlong_description
: Long category description<category-data
data-external-id="1000"
data-key="name">
</category-data>
<category-data
data-external-id="1000"
data-key="description">
<span slot="default">
Category not found or still loading...
</span>
</category-data>
<script>
const npGetCategoryId = () => dataLayer.findLast(item => item.event === "categoryView")?.categoryId;
</script>
<category-data
data-external-id="${npGetCategoryId()}"
data-key="name">
</category-data>
<category-data data-path="/category/subcategory">
<span slot="default">
Category not found or still loading...
</span>
</category-data>
<category-data data-path="${window.location.pathname}">
<span slot="default">
Category not found or still loading...
</span>
</category-data>
### Displaying Long Description
```html
<category-data
data-external-id="1000491"
data-key="long_description">
<div slot="default">
<p>Description not available at the moment.</p>
</div>
</category-data>
To display default content when the category is not loaded or not found, use the default
slot:
<category-data data-external-id="1000" data-key="description">
<span slot="default">
A default value
</span>
</category-data>
The content inside the default
slot will be displayed:
The library implements automatic caching with a 5-minute TTL to optimize requests and improve performance.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Store</title>
<script async="async" type="module">
import { NaperComponents } from 'https://unpkg.com/@naper/embed-components@1/dist/app.js';
NaperComponents.init({
store: 'https://your-store.naper.ai/',
integration: {
type: 'vtex',
name: 'production'
}
});
</script>
</head>
<body>
<category-data data-external-id="1000" data="description">
<h1>Category XYZ</h1>
</category-data>
<main>
<div>
<category-data data-external-id="1000" data="long_description"></category-data>
</div>
</main>
</body>
</html>
For questions or issues, please contact Naper support.
FAQs
Unknown package
The npm package @naper/embed-components receives a total of 26 weekly downloads. As such, @naper/embed-components popularity was classified as not popular.
We found that @naper/embed-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.