Skip to content

Commit

Permalink
Merge pull request #5 from williamtroup/0.5.1
Browse files Browse the repository at this point in the history
0.5.1
  • Loading branch information
William Troup authored Jan 5, 2024
2 parents ef6983b + 92e174c commit 46d5757
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 34 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
Observe.js

[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Observe.js%2C%20a%20free%20JavaScript%observe%builder&url=https://github.com/williamtroup/Observe.js&hashtags=javascript,html,observe)
[![npm](https://img.shields.io/badge/npmjs-v0.5.0-blue)](https://www.npmjs.com/package/jobserve.js)
[![nuget](https://img.shields.io/badge/nuget-v0.5.0-purple)](https://www.nuget.org/packages/jObserve.js/)
[![npm](https://img.shields.io/badge/npmjs-v0.5.1-blue)](https://www.npmjs.com/package/jobserve.js)
[![nuget](https://img.shields.io/badge/nuget-v0.5.1-purple)](https://www.nuget.org/packages/jObserve.js/)
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Observe.js/blob/main/LICENSE.txt)
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Observe.js/discussions)
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://github.com/williamtroup)
</h1>

> <p align="center">A lightweight, and easy-to-use, JavaScript library for observing any kind of JS object, or HTML DOM element, to detect changes!</p>
> <p align="center">v0.5.0</p>
> <p align="center">A lightweight JavaScript library that allows developers to keep track of changes to JavaScript objects and/or DOM elements.</p>
> <p align="center">v0.5.1</p>
<br />
<br>
Expand All @@ -19,7 +19,7 @@ Observe.js
- Zero-dependencies and extremely lightweight!
- JS Object and HTML DOM Element watching!
- Watch for specific property changes!
- Cancellation and Pausing support!
- Cancel, Pause, and Resume support!
- Full API available via public functions.
- Fully configurable!
- Fully configurable per watch!
Expand Down
10 changes: 5 additions & 5 deletions README_NUGET.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Observe.js v0.5.0
# Observe.js v0.5.1

[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Observe.js%2C%20a%20free%20JavaScript%observe%builder&url=https://github.com/williamtroup/Observe.js&hashtags=javascript,html,observe)
[![npm](https://img.shields.io/badge/npmjs-v0.5.0-blue)](https://www.npmjs.com/package/jobserve.js)
[![nuget](https://img.shields.io/badge/nuget-v0.5.0-purple)](https://www.nuget.org/packages/jObserve.js/)
[![npm](https://img.shields.io/badge/npmjs-v0.5.1-blue)](https://www.npmjs.com/package/jobserve.js)
[![nuget](https://img.shields.io/badge/nuget-v0.5.1-purple)](https://www.nuget.org/packages/jObserve.js/)
[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/williamtroup/Observe.js/blob/main/LICENSE.txt)
[![discussions Welcome](https://img.shields.io/badge/discussions-Welcome-red)](https://github.com/williamtroup/Observe.js/discussions)
[![coded by William Troup](https://img.shields.io/badge/coded_by-William_Troup-yellow)](https://github.com/williamtroup)

> A lightweight, and easy-to-use, JavaScript library for observing any kind of JS object, or HTML DOM element, to detect changes!
> A lightweight JavaScript library that allows developers to keep track of changes to JavaScript objects and/or DOM elements.

## What features does Observe.js have?

- Zero-dependencies and extremely lightweight!
- JS Object and HTML DOM Element watching!
- Watch for specific property changes!
- Cancellation and Pausing support!
- Cancel, Pause, and Resume support!
- Full API available via public functions.
- Fully configurable!
- Fully configurable per watch!
Expand Down
8 changes: 5 additions & 3 deletions dist/observe.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Observe.js v0.5.0 | (c) Bunoon | MIT License */
/*! Observe.js v0.5.1 | (c) Bunoon | MIT License */
(function() {
function collectDOMObjects() {
var tagTypes = _configuration.domElementTypes;
Expand Down Expand Up @@ -116,15 +116,17 @@
if (isDefinedFunction(watch.options.onPropertyChange)) {
compareWatchObjectProperties(oldValue, newValue, watch);
}
} else {
fireCustomTrigger(watch.options.onChange, oldValue, newValue);
}
}
watch.totalChanges++;
if (watch.options.pauseTimeoutOnChange > 0) {
pauseWatchObject(storageId, watch.options.pauseTimeoutOnChange);
}
if (watch.options.cancelOnChange) {
cancelWatchObject(storageId);
}
watch.totalChanges++;
if (watch.options.maximumChangesBeforeCanceling > 0 && watch.totalChanges >= watch.options.maximumChangesBeforeCanceling) {
cancelWatchObject(storageId);
}
Expand Down Expand Up @@ -402,7 +404,7 @@
return this;
};
this.getVersion = function() {
return "0.5.0";
return "0.5.1";
};
(function(documentObject, windowObject) {
_parameter_Document = documentObject;
Expand Down
24 changes: 12 additions & 12 deletions dist/observe.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions docs/CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Observe.js - Change Log:

## Version 0.5.1:
- Project description update.
- Minor documentation updates.
- Fixed a small fault that prevented the total changes from being handled correctly when a watch was stopped.
- Added support to watch array objects for changes.

<br>


## Version 0.5.0:

#### **New Features:**
Expand Down
4 changes: 2 additions & 2 deletions observe.js.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>jObserve.js</id>
<version>0.5.0</version>
<version>0.5.1</version>
<title>Observe.js</title>
<description>A lightweight, and easy-to-use, JavaScript library for observing any kind of JS object, or HTML DOM element, to detect changes.</description>
<description>A lightweight JavaScript library that allows developers to keep track of changes to JavaScript objects and/or DOM elements.</description>
<authors>William Troup</authors>
<projectUrl>https://github.com/williamtroup/Observe.js</projectUrl>
<repository type="git" url="https://github.com/williamtroup/Observe.js" branch="main" />
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "jobserve.js",
"title": "Observe.js",
"description": "A lightweight, and easy-to-use, JavaScript library for observing any kind of JS object, or HTML DOM element, to detect changes.",
"version": "0.5.0",
"description": "A lightweight JavaScript library that allows developers to keep track of changes to JavaScript objects and/or DOM elements.",
"version": "0.5.1",
"main": "dist/observe.js",
"author": {
"name": "Bunoon"
Expand Down
13 changes: 8 additions & 5 deletions src/observe.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* Observe.js
*
* A lightweight, and easy-to-use, JavaScript library for observing any kind of JS object, or HTML DOM element, to detect changes.
* A lightweight JavaScript library that allows developers to keep track of changes to JavaScript objects and/or DOM elements.
*
* @file observe.js
* @version v0.5.0
* @version v0.5.1
* @author Bunoon
* @license MIT License
* @copyright Bunoon 2023
Expand Down Expand Up @@ -194,9 +194,14 @@
if ( isDefinedFunction( watch.options.onPropertyChange ) ) {
compareWatchObjectProperties( oldValue, newValue, watch );
}

} else {
fireCustomTrigger( watch.options.onChange, oldValue, newValue );
}
}

watch.totalChanges++;

if ( watch.options.pauseTimeoutOnChange > 0 ) {
pauseWatchObject( storageId, watch.options.pauseTimeoutOnChange );
}
Expand All @@ -205,8 +210,6 @@
cancelWatchObject( storageId );
}

watch.totalChanges++;

if ( watch.options.maximumChangesBeforeCanceling > 0 && watch.totalChanges >= watch.options.maximumChangesBeforeCanceling ) {
cancelWatchObject( storageId );
}
Expand Down Expand Up @@ -717,7 +720,7 @@
* @returns {string} The version number.
*/
this.getVersion = function() {
return "0.5.0";
return "0.5.1";
};


Expand Down
Loading

0 comments on commit 46d5757

Please sign in to comment.