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

chance-path-object

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chance-path-object - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

24

index.js

@@ -1,3 +0,14 @@

/* eslint-disable complexity */
module.exports = ({root = false, dir = false, relative = false, name = false, dotfile = false, ext = false, base = false} = {}) => {
const Chance = require('chance');
const chance = new Chance();
module.exports = ({
root = false,
dir = false,
relative = false,
name = false,
dotfile = false,
ext = false,
base = false
} = {}) => {
const pathObject = {

@@ -16,3 +27,3 @@ base: '',

if (dir) {
const path = chance.n(chance.word, chance.d6()).join('/'); // eslint-disable-line no-undef
const path = chance.n(chance.word, chance.d6()).join('/');

@@ -29,7 +40,7 @@ if (root) {

if (name) {
pathObject.name = dotfile ? `.${chance.word()}` : chance.word(); // eslint-disable-line no-undef
pathObject.name = dotfile ? `.${chance.word()}` : chance.word();
}
if (ext) {
pathObject.ext = `.${chance.word()}`; // eslint-disable-line no-undef
pathObject.ext = `.${chance.word()}`;
}

@@ -45,3 +56,3 @@

} else {
pathObject.base = `${chance.word()}.${chance.word()}`; // eslint-disable-line no-undef
pathObject.base = `${chance.word()}.${chance.word()}`;
}

@@ -52,2 +63,1 @@ }

};
/* eslint-enable */
{
"name": "chance-path-object",
"description": "A Chance.js mixin to generate path objects.",
"version": "1.0.0",
"author": {
"name": "Michael Novotny",
"email": "manovotny@gmail.com",
"url": "htts://manovotny.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/manovotny/chance-path-object.git"
},
"keywords": [
"chance",
"generated",
"mixin",
"node",
"path",
"objects",
"random"
],
"engines": {
"node": ">=6"
},
"main": "index.js",
"files": [
"src"
],
"scripts": {
"lint": "eslint . --ext .json --ext .js",
"test": "npm run lint && npm run unit",
"unit": "jest"
},
"dependencies": {
"chance": "1.0.9"
},
"devDependencies": {
"eslint-config-get-off-my-lawn": "2.1.0",
"jest": "20.0.4"
}
"name": "chance-path-object",
"description": "A Chance.js mixin to generate path objects.",
"version": "1.0.1",
"author": {
"name": "Michael Novotny",
"email": "manovotny@gmail.com",
"url": "htts://manovotny.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/manovotny/chance-path-object.git"
},
"keywords": [
"chance",
"generated",
"mixin",
"node",
"path",
"objects",
"random"
],
"engines": {
"node": ">=8.6.0",
"yarn": ">=1.0.0"
},
"main": "index.js",
"files": [
"src"
],
"scripts": {
"lint": "eslint . --ext .js --ext .json",
"prettier": "prettier --write \"**/*.{js,json,md,yml}\"",
"prettier:check": "prettier --check \"**/*.{js,json,md,yml}\"",
"test": "yarn lint && yarn prettier:check && yarn unit",
"unit": "jest"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,json,md,yml}": [
"prettier --write",
"git add"
]
},
"dependencies": {
"chance": "1.1.0"
},
"devDependencies": {
"eslint": "6.2.1",
"eslint-config-get-off-my-lawn": "5.0.1",
"husky": "3.0.5",
"jest": "24.9.0",
"lint-staged": "9.2.5",
"prettier": "1.18.2"
},
"peerDependencies": {
"chance": "^1.0.13"
}
}
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