
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@blanquera/types
Advanced tools
Generic TS types library for general purposes.
$ npm i @blanquera/types
import { EventEmitter } from '@blanquera/types';
const emitter = new EventEmitter;
emitter.on('trigger something', async x => {
console.log('something triggered', x + 1)
})
emitter.on(/trigger (something)/, async x => {
await Helper.sleep(2000)
console.log('(something) triggered', x + 2)
}, 2)
await emitter.emit('trigger something', 1)
import { Exception } from '@blanquera/types';
throw Exception.for('Something %s is %s', 'good', 'bad')
import { HashStore } from '@blanquera/types';
const registry = new HashStore()
registry.set('foo', 'bar', 'zoo')
registry.set('foo', 'zoo', ['foo', 'bar', 'zoo'])
console.log(registry.has('foo', 'bar'))
console.log(registry.has('bar', 'foo'))
console.log(registry.get('foo', 'zoo', 1))
registry.remove('foo', 'bar')
console.log(registry.has('foo', 'bar'))
console.log(registry.has('foo', 'zoo'))
import { TaskQueue } from '@blanquera/types';
const queue = new TaskQueue;
queue.push(async x => {
console.log(x + 1)
})
queue.shift(async x => {
await Helper.sleep(2000)
console.log(x + 2)
})
queue.add(async x => {
console.log(x + 3)
}, 10)
await queue.run(1)
FAQs
Type definitions implementations for core types.
We found that @blanquera/types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.