Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "a-toolbox", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "javascript lightweight basic tools, isomorphic", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -74,2 +74,3 @@ # a-toolbox | ||
### fs | ||
note: not available on browser | ||
@@ -76,0 +77,0 @@ #### fs.exists(path) |
@@ -41,2 +41,3 @@ const nativeFs = require('fs') | ||
* @param {string} path (filePath) file path | ||
* @param {number} [mode=0o666] | ||
* @return {Promise.<void>} | ||
@@ -53,5 +54,5 @@ * @test.case '/tmp/touch-me' | ||
*/ | ||
fs.touch = function (path) { | ||
fs.touch = function (path, mode = 0o666) { | ||
return new Promise(function (resolve, reject) { | ||
nativeFs.open(path, 'a', (err, fd) => { | ||
nativeFs.open(path, 'a', mode, (err, fd) => { | ||
if (err) { | ||
@@ -58,0 +59,0 @@ reject(err) |
@@ -42,2 +42,5 @@ /** | ||
* @return {Object|Array} | ||
* @test.case {a: 1, b: 'ciao'} > {a: 1, b: 'ciao'} | ||
* @test.case {a: 4, c: { d: 8, e: 9}} > {a: 4, c: { d: 8, e: 9}} | ||
* @test.case {a: 4, b: 'ciao', c: { d: 8, e: 9 }} > {a: 4, b: 'ciao', c: { d: 8, e: 9 }} | ||
*/ | ||
@@ -44,0 +47,0 @@ clone: function (obj) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
274909
3632
355
0