Comparing version 5.7.0 to 5.8.0
@@ -261,2 +261,6 @@ /*global window*/ | ||
MagicPen.prototype.isAtStartOfLine = function () { | ||
return this.output.length === 0 || this.output[this.output.length - 1].length === 0; | ||
}; | ||
MagicPen.prototype.isBlock = function () { | ||
@@ -263,0 +267,0 @@ return this.output.length === 1 && |
@@ -601,2 +601,6 @@ /*! | ||
MagicPen.prototype.isAtStartOfLine = function () { | ||
return this.output.length === 0 || this.output[this.output.length - 1].length === 0; | ||
}; | ||
MagicPen.prototype.isBlock = function () { | ||
@@ -603,0 +607,0 @@ return this.output.length === 1 && |
{ | ||
"name": "magicpen", | ||
"version": "5.7.0", | ||
"version": "5.8.0", | ||
"description": "Styled output in both consoles and browsers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/MagicPen.js", |
@@ -597,2 +597,11 @@ # MagicPen | ||
### isAtStartOfLine() | ||
Returns `true` if the "cursor" is located at the start of a line. | ||
```js | ||
expect(magicpen().text('line 1\n').isAtStartOfLine(), 'to be true'); | ||
expect(magicpen().text('line 1').isAtStartOfLine(), 'to be false'); | ||
``` | ||
### use(plugin) | ||
@@ -599,0 +608,0 @@ |
Sorry, the diff of this file is too big to display
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
579720
4327
848