state-toggle
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "state-toggle", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Enter/exit a state", | ||
@@ -13,2 +13,6 @@ "license": "MIT", | ||
"bugs": "https://github.com/wooorm/state-toggle/issues", | ||
"funding": { | ||
"type": "github", | ||
"url": "https://github.com/sponsors/wooorm" | ||
}, | ||
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)", | ||
@@ -24,9 +28,9 @@ "contributors": [ | ||
"browserify": "^16.0.0", | ||
"nyc": "^14.0.0", | ||
"prettier": "^1.12.1", | ||
"remark-cli": "^6.0.0", | ||
"remark-preset-wooorm": "^4.0.0", | ||
"nyc": "^15.0.0", | ||
"prettier": "^1.0.0", | ||
"remark-cli": "^7.0.0", | ||
"remark-preset-wooorm": "^6.0.0", | ||
"tape": "^4.0.0", | ||
"tinyify": "^2.5.0", | ||
"xo": "^0.24.0" | ||
"tinyify": "^2.0.0", | ||
"xo": "^0.25.0" | ||
}, | ||
@@ -33,0 +37,0 @@ "scripts": { |
@@ -10,13 +10,13 @@ # state-toggle | ||
## Installation | ||
## Install | ||
[npm][]: | ||
```bash | ||
```sh | ||
npm install state-toggle | ||
``` | ||
## Usage | ||
## Use | ||
```javascript | ||
```js | ||
var toggle = require('state-toggle') | ||
@@ -41,5 +41,5 @@ | ||
Create a toggle, which when entering toggles `key` on `ctx` (or `this`, | ||
if `ctx` is not given) to `!initial`, and when exiting, sets `key` on | ||
the context back to the value it had before entering. | ||
Create a toggle, which when entering toggles `key` on `ctx` (or `this`, if `ctx` | ||
is not given) to `!initial`, and when exiting, sets `key` on the context back to | ||
the value it had before entering. | ||
@@ -56,4 +56,4 @@ ###### Returns | ||
If no `ctx` was given to `toggle`, the context object (`this`) of `enter()` | ||
is used to toggle. | ||
If no `ctx` was given to `toggle`, the context object (`this`) of `enter()` is | ||
used to toggle. | ||
@@ -60,0 +60,0 @@ ###### Returns |
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
5034