Comparing version 5.0.1 to 5.1.0
5.1.0 / 2018-08-08 | ||
================== | ||
**features** | ||
* [[`44ded02`](http://github.com/node-modules/coffee/commit/44ded027e022a000db1e908f764c4dc3288b0f4a)] - feat: print should take a goooood look (#63) (TZ | 天猪 <<atian25@qq.com>>) | ||
5.0.1 / 2018-08-07 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -41,8 +41,4 @@ 'use strict'; | ||
} | ||
restore() { | ||
// do nth | ||
} | ||
} | ||
module.exports = Rule; |
'use strict'; | ||
const is = require('is-type-of'); | ||
module.exports = function show(obj) { | ||
if (obj instanceof Buffer) { | ||
obj = obj.toString(); | ||
} | ||
const type = {}.toString.call(obj).replace(/^\[object (.*)\]$/, '$1'); | ||
if (is.buffer(obj)) obj = obj.toString(); | ||
// escape \n to \\n for good view in terminal | ||
return (typeof obj === 'string' ? obj.replace(/\n/g, '\\n') : obj) + | ||
'(' + {}.toString.call(obj).replace(/^\[object (.*)\]$/, '$1') + ')'; | ||
if (is.string(obj)) obj = obj.replace(/\n/g, '\\n'); | ||
// stringify if object | ||
if (!is.regexp(obj) && is.object(obj)) obj = JSON.stringify(obj); | ||
return `${obj}(${type})`; | ||
}; |
{ | ||
"name": "coffee", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"description": "Test command line on Node.js.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -180,3 +180,3 @@ # Coffee | ||
// do sth | ||
return super.assert(content, pattern, message); | ||
return super.assert(fs.existsSync(expected), true, `should exists file ${expected}`); | ||
} | ||
@@ -190,3 +190,14 @@ } | ||
} | ||
expectFile(expected) { | ||
this._addAssertion({ | ||
type: 'file', | ||
expected, | ||
}); | ||
return this; | ||
} | ||
} | ||
// Usage | ||
.expectFile('README.md'); | ||
``` | ||
@@ -193,0 +204,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20047
208
1
355