
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@nhz.io/abstract-resource-manager
Advanced tools
npm i -S @nhz.io/abstract-resource-manager
const AbstractResourceManager = require('@nhz.io/abstract-resource-manager')
class Manager extends AbstractResourceManager {
/* Implement the methods */
}
...
class AbstractResourceManager
manage: (resource) ->
return unless resource = @register resource
job = @getJob resource
if job
@stop job, resource if @shouldStop job, resource
config = @needUpgrade job, resource
job = @upgrade job, config if config
@start job, resource if @shouldStart job, resource
Return the resource
resource
unmanage: (resource) ->
return unless resource = @unregister resource
job = @getJob resource
if job
@stop job, resource if @shouldStop job, resource
config = @needDowngrade job, resource
job = @downgrade job, config if config
@start job, resource if @shouldStart job, resource
Return the resource
resource
register: (resource) -> resource
unregister: (resource) -> resource
getJob: (resource) -> null
shouldStart: (job, resource) -> false
shouldStop: (job, resource) -> false
needUpgrade: (job, resource) -> null
needDowngrade: (job, resource) -> null
upgrade: (job, config) -> null
downgrade: (job, config) -> null
start: (job, resource) -> job
stop: (job, resource) -> job
module.exports = AbstractResourceManager
test = require 'tape-async'
test 'AbstractResourceManager constructor', (t) ->
t.plan 1
manager = new AbstractResourceManager
t.ok manager instanceof AbstractResourceManager
FAQs
AbstractResourceManager Class
We found that @nhz.io/abstract-resource-manager 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.