How to use the pkg.hasOwnProperty function in pkg

To help you get started, we’ve selected a few pkg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngnjs / NGN / Gruntfile.js View on Github external
(fs.readdirSync(this.input.code)||[]).forEach(function(dir){
						if (fs.statSync(require('path').dirname(dir)).isDirectory()){
							var pkg = require('path').join(dir,'package.json');
							if (fs.existsSync(pkg)){
								var p = require(pkg);
								if (p.hasOwnProperty('dependencies')){
									me.node_modules = me.node_modules.concat(Object.keys(p.dependencies));
								}
								if (p.hasOwnProperty('devDependencies')){
									me.node_modules = me.node_modules.concat(Object.keys(p.devDependencies));
								}
							}
						}
					});
					this.node_modules = this.node_modules.filter(function(el,i,a){
github ngnjs / NGN / Gruntfile.js View on Github external
(fs.readdirSync(this.input.code)||[]).forEach(function(dir){
						if (fs.statSync(require('path').dirname(dir)).isDirectory()){
							var pkg = require('path').join(dir,'package.json');
							if (fs.existsSync(pkg)){
								var p = require(pkg);
								if (p.hasOwnProperty('dependencies')){
									me.node_modules = me.node_modules.concat(Object.keys(p.dependencies));
								}
								if (p.hasOwnProperty('devDependencies')){
									me.node_modules = me.node_modules.concat(Object.keys(p.devDependencies));
								}
							}
						}
					});
					this.node_modules = this.node_modules.filter(function(el,i,a){