🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

noda

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noda - npm Package Compare versions

Comparing version
0.1.0
to
0.1.1
+6
-0
CHANGELOG.md

@@ -5,2 +5,8 @@ # noda Change Log

## [0.1.1] - 2017-11-05
### Changed
* For `noda.requireDir()` and `noda.inRequireDir()`, d irectory "node_modules" is always ignored whether or not it is explictly added in `ignores`.
## [0.1.0] - 2017-10-31

@@ -7,0 +13,0 @@

+3
-1

@@ -160,4 +160,6 @@ /**

* Read the directory and require all javascript modules except those excluded.
* ATTENTION: Directory 'node_modules' is always excluded.
* @param {string} dirname
* @param {Array} [excludes = ['index']]
* @param {Array} [excludes = ['index']] names to be excluded(ignored)
* @param {string} [exlucdes] the only name to be excluded(ingored)
* @return {Object}

@@ -164,0 +166,0 @@ */

{
"name": "noda",
"version": "0.1.0",
"version": "0.1.1",
"description": "NOde Developing Assistant",

@@ -9,3 +9,7 @@ "main": "index.js",

},
"keywords": [],
"keywords": [
"require",
"require-all",
"package-homepath"
],
"author": {

@@ -12,0 +16,0 @@ "name": "YounGoat",

@@ -38,5 +38,5 @@ # noda

Before read APIs, please understand that
0. The phrase "current package" refers to the NPM package which contains the nodejs file where code `noda.*` located.
0. Parameter `subpath` refers to pathname relative to the basepath of "current package".
Before read APIs, please understand that
1. The phrase "current package" refers to the NPM package which contains the nodejs file where code `noda.*` located.
2. Parameter `subpath` refers to pathname relative to the basepath of "current package".

@@ -56,3 +56,3 @@ * __noda.currentPackage__()

* __noda.inRequireDir__(*string* dirname, *Array* ignores)
* __noda.inRequireDir__(*string* dirname, *Array* | *string* ignores)
Based on requireDir(), but the dirname is regarded as relative path to home directory of the package in which the caller is located.

@@ -68,4 +68,5 @@

* __noda.requireDir__(*string* dirname, *Array* excludes)
Read the directory and require all javascript modules except those excluded, and returned them in an object with keys equal to modules' name. Relative __dirname__ is acceptable.
* __noda.requireDir__(*string* dirname, *Array* | *string* ignores)
Read the directory and require all javascript modules except those excluded, and returned them in an object with keys equal to modules' name. Relative __dirname__ is acceptable.
ATTENTION:__Directory "node_modules" is always ignored whether or not it is explictly added in `ignores`.__

@@ -89,2 +90,31 @@ * __noda.existsInPackage__

Suppose that there is an NPM package named *ching*:
```
+ ching
+ bin
+ command
+ lib
+ node_modules
+ util
. CHANGELOG.md
. conf.js
. index.js
. package.json
. README.md
```
Let's see what __noda__ can do.
```javascript
// FILE: ching/command/init/index.js
const noda = require('noda');
// Read ching/package.json and return the parsed JSON object.
noda.currentPackage();
// Require ching/util/rc.js and return.
noda.inRequire('util/rc');
```
## Why *noda*

@@ -91,0 +121,0 @@