Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base-options

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-options - npm Package Compare versions

Comparing version 0.1.0 to 0.1.2

7

index.js

@@ -10,2 +10,4 @@ /*!

var utils = require('./utils');
module.exports = function(key, value) {

@@ -16,8 +18,9 @@ this.options = this.options || {};

if (arguments.length === 1) {
return this.get('options.' + key);
return utils.get(this.options, key);
}
this.set('options.' + key, value);
utils.set(this.options, key, value);
this.emit('option', key, value);
return this;
}
if (typeof key !== 'object') {

@@ -24,0 +27,0 @@ throw new TypeError('expected a string or object.');

{
"name": "base-options",
"description": "Adds an `option` method to base-methods.",
"version": "0.1.0",
"version": "0.1.2",
"homepage": "https://github.com/jonschlinkert/base-options",

@@ -23,3 +23,6 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"base-methods": "^0.2.10"
"base-methods": "^0.2.10",
"get-value": "^1.2.1",
"lazy-cache": "^0.2.3",
"set-value": "^0.2.0"
},

@@ -29,6 +32,15 @@ "devDependencies": {

},
"keywords": [],
"keywords": [
"app",
"base",
"base-methods",
"data",
"extend",
"merge",
"methods"
],
"verb": {
"related": {
"list": [
"base-data",
"base-methods",

@@ -39,2 +51,2 @@ "class-utils"

}
}
}

@@ -37,2 +37,3 @@ # base-options [![NPM version](https://badge.fury.io/js/base-options.svg)](http://badge.fury.io/js/base-options)

* [base-data](https://www.npmjs.com/package/base-data): adds a `data` method to base-methods. | [homepage](https://github.com/jonschlinkert/base-data)
* [base-methods](https://www.npmjs.com/package/base-methods): Starter for creating a node.js application with a handful of common methods, like `set`, `get`,… [more](https://www.npmjs.com/package/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods)

@@ -39,0 +40,0 @@ * [class-utils](https://www.npmjs.com/package/class-utils): Utils for working with JavaScript classes and prototype methods. | [homepage](https://github.com/jonschlinkert/class-utils)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc