Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jquery-once

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-once - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

HISTORY.md

10

jquery.once.js
/*!
* jQuery Once v2.0.0 - http://github.com/robloach/jquery-once
* jQuery Once v2.0.1 - http://github.com/robloach/jquery-once
* @license MIT, GPL-2.0

@@ -35,3 +35,3 @@ * http://opensource.org/licenses/MIT

*
* @param {string} [id="once"]
* @param {string} [id=once]
* A string representing the ID to check. Defaults to `"once"`.

@@ -55,3 +55,3 @@ *

*
* @param {string} [id="once"]
* @param {string} [id=once]
* The data ID used to determine whether the given elements have already

@@ -104,3 +104,3 @@ * been processed or not. Defaults to `"once"`.

*
* @param {string} [id="once"]
* @param {string} [id=once]
* A string representing the name of the data ID which should be used when

@@ -140,3 +140,3 @@ * filtering the elements. This only filters elements that have already been

*
* @param {string} [id="once"]
* @param {string} [id=once]
* A string representing the name of the data id which should be used when

@@ -143,0 +143,0 @@ * filtering the elements. This only filters elements that have already

/*!
* jQuery Once v2.0.0 - http://github.com/robloach/jquery-once
* jQuery Once v2.0.1 - http://github.com/robloach/jquery-once
* @license MIT, GPL-2.0

@@ -4,0 +4,0 @@ * http://opensource.org/licenses/MIT

@@ -1,4 +0,1 @@

<!-- LICENSEFILE/ -->
# License

@@ -17,5 +14,1 @@

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<!-- /LICENSEFILE -->

@@ -5,3 +5,3 @@ {

"description": "Act on jQuery elements only once.",
"version": "2.0.0",
"version": "2.0.1",
"keywords": [

@@ -18,3 +18,2 @@ "jquery",

},
"repo": "RobLoach/jquery-once",
"homepage": "https://github.com/RobLoach/jquery-once",

@@ -55,18 +54,21 @@ "author": "Rob Loach (http://github.com/RobLoach)",

"devDependencies": {
"eslint": "~0.12.0",
"jsdoc-to-markdown": "~0.6.2",
"jsdom": "~3.0.1",
"mocha": "~2.1.0",
"mocha-jsdom": "~0.2.0",
"projectz": "~0.3.17",
"uglify-js": "~2.4.16"
"eslint": "^0.20.0",
"jsdoc-to-markdown": "^1.0.3",
"jsdom": "~3.1.2",
"mocha": "~2.2.4",
"mocha-jsdom": "~0.3.0",
"uglify-js": "~2.4.21"
},
"scripts": {
"pretest": "./node_modules/.bin/eslint jquery.once.js test/test.js",
"test": "./node_modules/.bin/mocha",
"projectz": "./node_modules/.bin/projectz compile",
"docs": "./node_modules/.bin/jsdoc2md jquery.once.js > API.md",
"build": "./node_modules/.bin/uglifyjs jquery.once.js -o jquery.once.min.js --comments --source-map jquery.once.min.js.map --mangle",
"pretest": "eslint jquery.once.js test/test.js",
"test": "mocha",
"docs": "jsdoc2md jquery.once.js > API.md",
"build": "uglifyjs jquery.once.js -o jquery.once.min.js --comments --source-map jquery.once.min.js.map --mangle",
"package": "npm install && npm run test && npm run projectz && npm run docs && npm run build"
}
}
},
"files": [
"jquery.once.js",
"jquery.once.min.js",
"jquery.once.min.js.map"
]
}

@@ -1,11 +0,3 @@

<!-- TITLE/ -->
# jQuery Once
<!-- /TITLE -->
<!-- BADGES/ -->
[![Build Status](https://img.shields.io/travis/RobLoach/jquery-once/master.svg)](http://travis-ci.org/RobLoach/jquery-once "Check this project's build status on TravisCI")

@@ -15,21 +7,9 @@ [![NPM version](https://img.shields.io/npm/v/jquery-once.svg)](https://npmjs.org/package/jquery-once "View this project on NPM")

[![Dependency Status](https://img.shields.io/david/RobLoach/jquery-once.svg)](https://david-dm.org/RobLoach/jquery-once)
[![Dev Dependency Status](https://img.shields.io/david/dev/RobLoach/jquery-once.svg)](https://david-dm.org/RobLoach/jquery-once#info=devDependencies)<br/>
[![Dev Dependency Status](https://img.shields.io/david/dev/RobLoach/jquery-once.svg)](https://david-dm.org/RobLoach/jquery-once#info=devDependencies)
Act on [jQuery](http://jquery.com) elements only once.
<!-- /BADGES -->
<!-- DESCRIPTION/ -->
Act on jQuery elements only once.
<!-- /DESCRIPTION -->
Filters out all elements that had the same filter applied on them before. It can
be used to ensure that a function is only applied once to an element.
<!-- INSTALL/ -->
## Install

@@ -46,3 +26,3 @@

### [Ender](http://ender.jit.su/)
### [Ender](http://enderjs.com)
- Use: `require('jquery-once')`

@@ -59,10 +39,28 @@ - Install: `ender add jquery-once`

<!-- /INSTALL -->
## Usage
See the [API documentation](API.md) for details on how to use jQuery Once.
``` javascript
// The following will change the color of each paragraph to red, just once
// for the "changecolor" key.
$('p').once('changecolor').css('color', 'red');
// .once() will return a set of elements that yet to have the once ID
// associated with them. You can return to the original collection set by
// using .end().
$('p')
.once("changecolorblue")
.css("color", "blue")
.end()
.css("color", "red");
// To execute a function on the once set, you can use jQuery's each().
$('div.calendar').once().each(function() {
// Since there is no once ID provided here, the key will be "once".
});
```
[See the API documentation for more information on how to use jQuery Once.](https://github.com/RobLoach/jquery-once/blob/master/API.md#readme)
## Development

@@ -79,8 +77,2 @@

Update project documentation with [Projectz](https://github.com/bevry/projectz)
and [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown):
npm run projectz
npm run docs
Build `jquery.once.min.js` with:

@@ -90,2 +82,6 @@

Update API documentation with [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown):
npm run docs
Tag and publish the new versions to [npm](http://npmjs.com) with [Semantic

@@ -99,12 +95,6 @@ Versioning](http://semver.org/):

<!-- HISTORY/ -->
## History
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/RobLoach/jquery-once/blob/master/HISTORY.md#files)
[Discover the change history by heading on over to the `HISTORY.md` file.](HISTORY.md)
<!-- /HISTORY -->
<!-- LICENSE/ -->
## License

@@ -117,35 +107,2 @@

Copyright &copy; Rob Loach (http://github.com/RobLoach)
<!-- /LICENSE -->
<!-- BACKERS/ -->
## Backers
### Maintainers
These amazing people are maintaining this project:
- Rob Loach (https://github.com/RobLoach)
### Sponsors
No sponsors yet! Will you be the first?
### Contributors
These amazing people have contributed code to this project:
- [JohnAlbin](https://github.com/JohnAlbin) — [view contributions](https://github.com/RobLoach/jquery-once/commits?author=JohnAlbin)
- [Rob Loach](https://github.com/RobLoach) <robloach@gmail.com> — [view contributions](https://github.com/RobLoach/jquery-once/commits?author=RobLoach)
- [theodoreb](https://github.com/theodoreb) — [view contributions](https://github.com/RobLoach/jquery-once/commits?author=theodoreb)
[Become a contributor!](https://github.com/RobLoach/jquery-once/blob/master/CONTRIBUTING.md#files)
<!-- /BACKERS -->
Copyright &copy; [Rob Loach](http://github.com/RobLoach)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc