aneka 0.0.16 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aneka",
3
- "version": "0.0.16",
3
+ "version": "0.0.20",
4
4
  "description": "cemacemla",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -30,6 +30,7 @@ module.exports = {
30
30
  isSet: require('./misc/is-set'),
31
31
  print: require('./misc/print'),
32
32
  parseBool: require('./misc/parse-bool'),
33
+ dump: require('./misc/dump'),
33
34
  // object
34
35
  sanitizeObject: require('./object/sanitize')
35
36
  }
@@ -18,7 +18,7 @@ module.exports = async function (dir, transformer, options = {}) {
18
18
  if (filter(strippeds, f => f === stripped).length > 1) throw new (`File '${stripped}.{json,js}' already used`)
19
19
  try {
20
20
  let mod = require(file)
21
- if (isFunction(mod)) mod = await mod(options.module)
21
+ if (isFunction(mod)) mod = await mod(options.scope)
22
22
  result.push(await transformer(file, mod, options.transformer))
23
23
  } catch (err) {
24
24
  throw err
@@ -0,0 +1,6 @@
1
+ const util = require('util')
2
+
3
+ module.exports = function (obj) {
4
+ const result = util.inspect(obj, false, null, true)
5
+ console.log(result)
6
+ }
package/src/misc/fatal.js CHANGED
@@ -1,8 +1,10 @@
1
1
  const print = require('./print')
2
2
  const { get } = require('lodash')
3
+ const isSet = require('./is-set')
3
4
 
4
- module.exports = msg => {
5
+ module.exports = function (msg, terminate) {
6
+ if (!isSet(terminate)) terminate = true
5
7
  const debug = get(process, 'env.DEBUG', false)
6
8
  if (msg instanceof Error) msg = msg.message
7
- print(msg, true, debug ? 'trace' : 'error')
9
+ print(msg, terminate, debug ? 'trace' : 'error')
8
10
  }