Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,4 @@
'use strict';
module.exports = function () {
return process.getuid && process.getuid() === 0;
};

View File

@@ -0,0 +1,68 @@
{
"_args": [
[
"is-root@1.0.0",
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project"
]
],
"_from": "is-root@1.0.0",
"_id": "is-root@1.0.0",
"_inBundle": false,
"_integrity": "sha1-B7bCM7w5TNnQK6FclmvWZg1jQtU=",
"_location": "/react-scripts/is-root",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "is-root@1.0.0",
"name": "is-root",
"escapedName": "is-root",
"rawSpec": "1.0.0",
"saveSpec": null,
"fetchSpec": "1.0.0"
},
"_requiredBy": [
"/react-scripts/react-dev-utils"
],
"_resolved": "https://registry.npmjs.org/is-root/-/is-root-1.0.0.tgz",
"_spec": "1.0.0",
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "http://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/is-root/issues"
},
"description": "Check if the process is running as root user, eg. started with `sudo`.",
"devDependencies": {
"mocha": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/is-root#readme",
"keywords": [
"sudo",
"root",
"user",
"permissions",
"uid",
"process",
"posix"
],
"license": "MIT",
"name": "is-root",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/is-root.git"
},
"scripts": {
"test": "mocha"
},
"version": "1.0.0"
}

View File

@@ -0,0 +1,30 @@
# is-root [![Build Status](https://travis-ci.org/sindresorhus/is-root.svg?branch=master)](https://travis-ci.org/sindresorhus/is-root)
> Check if the process is running as root user, eg. started with `sudo`.
## Install
```sh
$ npm install --save is-root
```
## Usage
```sh
$ sudo node index.js
```
```js
// index.js
var isRoot = require('is-root');
isRoot();
//=> true
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)