
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
loopback-softdelete
Advanced tools
This module is designed for the Strongloop Loopback framework. It allows entities of any Model to be "soft deleted" by adding deletedAt and isDeleted attributes. Queries following the standard format will not return these entities; they can only be accessed by adding { isDeleted: true } to qutheery object (at the same level as where, include etc).
npm install --save loopback-softdelete
yarn add loopback-softdelete
Add the mixins property to your server/model-config.json:
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
"../node_modules/loopback-softdelete",
"../common/mixins"
]
}
}
To use with your Models add the mixins attribute to the definition object of your model config.
{
"name": "project",
"plural": "projects",
"base": "PersistedModel",
"properties": {
"name": {
"type": "string",
"required": true
}
},
"mixins": {
"SoftDelete" : true,
},
},
To run queries that include deleted items in the response, add { isDeleted: true } to the query object (at the same level as where, include etc).
Run tests using this command.
npm test
FAQs
SoftDelete mixin for Loopback.
We found that loopback-softdelete 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.