New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

base-cwd

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-cwd - npm Package Compare versions

Comparing version 0.1.8 to 0.2.0

13

index.js

@@ -11,2 +11,3 @@ /*!

var path = require('path');
var isValidInstance = require('is-valid-instance');
var isRegistered = require('is-registered');

@@ -16,3 +17,3 @@

return function plugin() {
if (!isValidInstance(this, fn)) return;
if (!isValid(this)) return;

@@ -40,10 +41,10 @@ Object.defineProperty(this, 'cwd', {

function isValidInstance(app, fn) {
if (typeof fn === 'function') {
return fn(app, 'base-cwd');
function isValid(app) {
if (!isValidInstance(app)) {
return false;
}
if (app && typeof app === 'object' && (app.isCollection || app.isView)) {
if (isRegistered(app, 'base-cwd')) {
return false;
}
return !isRegistered(app, 'base-cwd');
return true;
}
{
"name": "base-cwd",
"description": "Base plugin that adds a getter/setter for the current working directory.",
"version": "0.1.8",
"version": "0.2.0",
"homepage": "https://github.com/node-base/base-cwd",

@@ -53,4 +53,5 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"dependencies": {
"is-registered": "^0.1.3"
"is-registered": "^0.1.3",
"is-valid-instance": "^0.1.0"
}
}

@@ -93,2 +93,2 @@ # base-cwd [![NPM version](https://img.shields.io/npm/v/base-cwd.svg?style=flat)](https://www.npmjs.com/package/base-cwd) [![NPM downloads](https://img.shields.io/npm/dm/base-cwd.svg?style=flat)](https://npmjs.org/package/base-cwd) [![Build Status](https://img.shields.io/travis/node-base/base-cwd.svg?style=flat)](https://travis-ci.org/node-base/base-cwd)

_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 15, 2016._
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 17, 2016._
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