Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@c8/base-service
Advanced tools
A base service package that defines basic methods on the service layer
A base service package that implements Base Model on the service layer
Adds base model instance in the service exposing it for use.
npm install @c8/base-service
BaseService
requires a valid model instance to be passed in the constructor
Throws Must pass a valid initialized base model instance
Error if no valid BaseModel
instance passed
Exposes this.model
property.
// my-service/index.js
const MyModel = require('../models/my-model')
const BaseService = require('@c8/base-service')
class MyService extends BaseService {
}
module.exports = new MyService(MyModel)
In case you need to extend the service:
class MyService extends BaseService {
static insert(clause) {
return this.model.insert(clause)
}
}
NOTE: The methods you call with this.model.{method}()
when extending the base service HAVE to be defined in your model.
FAQs
A base service package that defines basic methods on the service layer
The npm package @c8/base-service receives a total of 0 weekly downloads. As such, @c8/base-service popularity was classified as not popular.
We found that @c8/base-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.