New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

settings-manager

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

settings-manager

A package for abstracting settings repositories

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

settings-manager

A facade for user settings repositories.

Build Status NPM version Dependency Status

Introduction

This is intended as a generic interface to an asynchronous setting API. Using this library allows for abstraction of the underlying settings. This package was intended for plugin development in order to make plugins portable across platforms.

Setup

npm install

Building

A build will check the source code and place code in the build\dist folder.

npm run build

To run a build on source code changes:

npm run build:watch

To build distributable artifacts (which includes a minimized version as well as burning in build-time data):

npm run dist

Running Tests

To run tests against the source code and dist folder (including coverage):

npm test

To run tests against the source code and dist folder (including coverage), with reload:

npm run test:watch

Build a Release

This is a basic script which can be used to build and deploy (to NPM) the project.

npm run release

Releases to the NPM registry are handled by Travis CI. Pushing master to GitHub will trigger a build and deploy to the NPM registry. The release script will NOT push to the repository. When pushing, tags should be included:

git push --all && git push --tags

API

new SettingsManager([backing_store])

Creates a new SettingsManager instance. The optional backing store should implement the same API as SettingsManager, or have an adapter provided. With no backing store specified, an in-memory store will be used.

load([success][, error])

Loads the settings. Takes a success callback and an error callback. The value passed into the settings callback represents the value from the backing store.

save(settings[, success][, error])

Saves the settings. Requires the settings to save and takes an optional callback for the success or error status.

clear([success][, error]])

Clears the settings. Takes an optional callback for the success or error status.

Keywords

settings repository

FAQs

Package last updated on 30 Apr 2019

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