aneka 0.0.15 → 0.0.19

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.15",
3
+ "version": "0.0.19",
4
4
  "description": "cemacemla",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -29,6 +29,8 @@ module.exports = {
29
29
  fetchUrl: require('./misc/fetch-url'),
30
30
  isSet: require('./misc/is-set'),
31
31
  print: require('./misc/print'),
32
+ parseBool: require('./misc/parse-bool'),
33
+ dump: require('./misc/dump'),
32
34
  // object
33
35
  sanitizeObject: require('./object/sanitize')
34
36
  }
@@ -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
  }
@@ -0,0 +1,5 @@
1
+ module.exports = function (input = '', caseInsensitive = false) {
2
+ const falsy = ['0', '0n', 'null', 'undefined', 'false', 'NaN', '']
3
+ if (caseInsensitive) input = input.toLowerCase()
4
+ return !falsy.includes(input)
5
+ }