
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
gtin-manager
Advanced tools
Generates Global Trade Item Numbers (formerly known as EANs) for a given Global Company Prefix.
npm install gtin-manager
// or
yarn add gtin-manager
Create a generator instance using a GCP (Global Company Prefix) provided by GS1.
import Manager from 'gtin-manager'
const manager = new Manager('12345678')
manager.contingent
Returns the amount of possible GTINs that can be created from the current GCP.
manager.contingent === 10000 // true
manager.index(number)
Returns GTIN / EAN for an index (which has to be inside the bounds of manager.contingent
)
manager.index(0) === '1234567800004' // true
manager.index(9999) === '1234567899992' // true
manager.index(10000) // Error: Index out of bounds
manager.index(-1) // Error: Index out of bounds
manager.all
Returns an array of all possible GTINs / EANs for the GCP.
manager.all === ['1234567800011', '1234567800028', ... 9998 more items] // true
🌻 Thanks to xbpf/gtin for providing functions used in this repository.
FAQs
GTIN Manager
The npm package gtin-manager receives a total of 10 weekly downloads. As such, gtin-manager popularity was classified as not popular.
We found that gtin-manager demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.