
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Intercepts event with before
and after
.
npm install intercepts
var intercepts = require('intercepts')
function Users() {
intercepts(this)
f(this.before)
f(this.after)
f(this.intercepts)
this.create = function (data, callback, onError) {
this.intercepts('create', arguments, create)
function create(done) {
log('create data', data)
eq(data.age, 21)
data.age = 22
done()
}
return this
}
}
var users = new Users
users.before('create', function (done) {
log('before create', this)
var data = this[0]
eq(data.name, 'jack')
eq(data.age, 20)
data.age = 21
done()
})
users.after('create', function (done) {
log('after create', this)
var data = this[0]
eq(data.name, 'jack')
eq(data.age, 22)
done()
})
users.create({name: 'jack', age: 20}, function () {
log('create successful')
}, function () {
log('create error')
})
var intercepts = require('intercepts');
var obj = {};
intercepts(obj);
MIT
FAQs
Intercepts event with `before` and `after`.
The npm package intercepts receives a total of 2 weekly downloads. As such, intercepts popularity was classified as not popular.
We found that intercepts 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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.