Socket
Book a DemoInstallSign in
Socket

nachos-api

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nachos-api

The API to interact with nachos

1.0.1
latest
Source
npmnpm
Version published
Maintainers
4
Created
Source

nachos-api

API to interact with nachos core

LinuxOSXWindowsCoverageDependenciesDevDependencies
Coverage Status

Have a problem? Come chat with us!

Join the chat at https://gitter.im/nachos/nachos-api

Installation

$ [sudo] npm install nachos-api --save

Usage

Initialization

var nachosApi = require('nachos-api');

Custom events

on(packageName, callback)

Register custom events

nachosApi.on('your-package', function () {
  // Code to execute on event custom.your-package
});

emit(packageName, data)

Emit custom event

nachosApi.emit('your-package', { ... }); // -> emits custom.your-package with the sent data

removeListener(packageName, callback)

Remove event listener

nachosApi.removeListener('your-package', cb);  // cb -> The callback used on registration

Settings

Example

nachosApi.settings('your-package')
  .save({ ... })
  .then(function () {
    // Saved data successfully
  });

See settings-file documentation to see list of available functions

Server

Examples

nachosApi.server.users.me()
  .then(function (user) {
    // user -> your user data
  });

See server-api documentation to see list of available functions

System

open(data)

nachosApi.system.open('path/to/file')
  .then(function () {
    // Opened successfully
  });

Run Tests

$ npm test

License

MIT

Keywords

nachos

FAQs

Package last updated on 14 Aug 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.