From 3da5b680b09ccfbf1e9948a871eb47b710e63f3d Mon Sep 17 00:00:00 2001 From: William Troup Date: Thu, 4 Jan 2024 22:11:41 +0000 Subject: [PATCH 1/9] Updated to v0.5.0. --- README.md | 6 +++--- README_NUGET.md | 6 +++--- dist/observe.js | 4 ++-- dist/observe.min.js | 4 ++-- docs/CHANGE_LOG.md | 6 ++++++ observe.js.nuspec | 2 +- package.json | 2 +- src/observe.js | 4 ++-- 8 files changed, 20 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 90feb64..aa32a48 100644 --- a/README.md +++ b/README.md @@ -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.4.0-blue)](https://www.npmjs.com/package/jobserve.js) -[![nuget](https://img.shields.io/badge/nuget-v0.4.0-purple)](https://www.nuget.org/packages/jObserve.js/) +[![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/) [![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!

->

v0.4.0

+>

v0.5.0



diff --git a/README_NUGET.md b/README_NUGET.md index 238a733..63bf346 100644 --- a/README_NUGET.md +++ b/README_NUGET.md @@ -1,8 +1,8 @@ -# Observe.js v0.4.0 +# Observe.js v0.5.0 [![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.4.0-blue)](https://www.npmjs.com/package/jobserve.js) -[![nuget](https://img.shields.io/badge/nuget-v0.4.0-purple)](https://www.nuget.org/packages/jObserve.js/) +[![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/) [![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) diff --git a/dist/observe.js b/dist/observe.js index 56135fe..6664b07 100644 --- a/dist/observe.js +++ b/dist/observe.js @@ -1,4 +1,4 @@ -/*! Observe.js v0.4.0 | (c) Bunoon | MIT License */ +/*! Observe.js v0.5.0 | (c) Bunoon | MIT License */ (function() { function collectDOMObjects() { var tagTypes = _configuration.domElementTypes; @@ -362,7 +362,7 @@ return this; }; this.getVersion = function() { - return "0.4.0"; + return "0.5.0"; }; (function(documentObject, windowObject) { _parameter_Document = documentObject; diff --git a/dist/observe.min.js b/dist/observe.min.js index 8c63381..50ce7ea 100644 --- a/dist/observe.min.js +++ b/dist/observe.min.js @@ -1,4 +1,4 @@ -/*! Observe.js v0.4.0 | (c) Bunoon | MIT License */ +/*! Observe.js v0.5.0 | (c) Bunoon | MIT License */ (function(){function H(){for(var a=m.domElementTypes,b=a.length,c=0;c=k.starts){if(d.hasOwnProperty(h)){var e=d[h],g=p(e.domElementId), r=null;g&&(r=v.getElementById(e.domElementId),n(r)?e.originalObject=r.outerHTML:e.originalObject=y.empty);var z=e.cachedObject,t=e.originalObject;t=g?t:JSON.stringify(t);z!==t&&(e.options.reset?g?r.outerHTML=e.cachedObject:e.originalObject=w(z).result:e.cachedObject=t,g?A(e.options.onChange,z,t):(g=w(z).result,r=w(t).result,A(e.options.onChange,g,r),B(e.options.onPropertyChange)&&!L(g)&&M(g,r,e.options)),0b;b++){8!==b&&12!==b&&16!==b&&20!==b||a.push("-");var c=Math.floor(16*Math.random()).toString(16);a.push(c)}return a.join(y.empty)}function n(a){return null!==a&&void 0!==a&&a!==y.empty}function q(a){return n(a)&&"object"===typeof a}function p(a){return n(a)&&"string"===typeof a}function B(a){return n(a)&&"function"=== typeof a}function L(a){return q(a)&&a instanceof Array}function x(a){return q(a)&&a instanceof Date}function F(a,b){return n(a)&&"boolean"===typeof a?a:b}function G(a,b){return B(a)?a:b}function E(a,b){return n(a)&&"number"===typeof a?a:b}function w(a){var b=!0,c=null;try{p(a)&&(c=JSON.parse(a))}catch(f){try{c=eval("("+a+")"),B(c)&&(c=c())}catch(k){b=P("Errors in object: "+f.message+", "+k.message),c=null}}return{parsed:b,result:c}}function P(a){var b=!0;m.safeMode||(console.error(a),b=!1);return b} function O(){m.safeMode=F(m.safeMode,!0);var a=m,b=m.domElementTypes,c=["*"];p(b)?(b=b.split(y.space),0===b.length&&(b=c)):b=L(b)?b:c;a.domElementTypes=b}var v=null,C=null,y={empty:""},d={},m={};this.watch=function(a,b){return K(a,b)};this.cancelWatch=function(a){var b=!1;if(d.hasOwnProperty(a))u(a),b=!0;else for(var c in d)if(d.hasOwnProperty(c)&&p(d[c].domElementId)&&d[c].domElementId===a){u(c);b=!0;break}return b};this.cancelWatches=function(){N();return this};this.getWatch=function(a){var b=null; -if(d.hasOwnProperty(a))b=d[a];else for(var c in d)if(d.hasOwnProperty(c)&&p(d[c].domElementId)&&d[c].domElementId===a){b=d[c];break}return b};this.getWatches=function(){return d};this.pauseWatch=function(a,b){var c=!1;if(d.hasOwnProperty(a))c=D(a,b);else for(var f in d)if(d.hasOwnProperty(f)&&p(d[f].domElementId)&&d[f].domElementId===a){c=D(f,b);break}return c};this.searchDomForNewWatches=function(){H();return this};this.setConfiguration=function(a){m=q(a)?a:{};O();return this};this.getVersion=function(){return"0.4.0"}; +if(d.hasOwnProperty(a))b=d[a];else for(var c in d)if(d.hasOwnProperty(c)&&p(d[c].domElementId)&&d[c].domElementId===a){b=d[c];break}return b};this.getWatches=function(){return d};this.pauseWatch=function(a,b){var c=!1;if(d.hasOwnProperty(a))c=D(a,b);else for(var f in d)if(d.hasOwnProperty(f)&&p(d[f].domElementId)&&d[f].domElementId===a){c=D(f,b);break}return c};this.searchDomForNewWatches=function(){H();return this};this.setConfiguration=function(a){m=q(a)?a:{};O();return this};this.getVersion=function(){return"0.5.0"}; (function(a,b){v=a;C=b;O();v.addEventListener("DOMContentLoaded",function(){H()});C.addEventListener("unload",function(){N()});n(C.$observe)||(C.$observe=this)})(document,window)})(); \ No newline at end of file diff --git a/docs/CHANGE_LOG.md b/docs/CHANGE_LOG.md index 02b162f..8085152 100644 --- a/docs/CHANGE_LOG.md +++ b/docs/CHANGE_LOG.md @@ -1,5 +1,11 @@ # Observe.js - Change Log: +## Version 0.5.0: +- + +
+ + ## Version 0.4.0: #### **Public Functions:** diff --git a/observe.js.nuspec b/observe.js.nuspec index 653de0f..9fcacab 100644 --- a/observe.js.nuspec +++ b/observe.js.nuspec @@ -2,7 +2,7 @@ jObserve.js - 0.4.0 + 0.5.0 Observe.js A lightweight, and easy-to-use, JavaScript library for observing any kind of JS object, or HTML DOM element, to detect changes. William Troup diff --git a/package.json b/package.json index 8b80507..854a4e6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "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.4.0", + "version": "0.5.0", "main": "dist/observe.js", "author": { "name": "Bunoon" diff --git a/src/observe.js b/src/observe.js index 2ac5b80..08ab70a 100644 --- a/src/observe.js +++ b/src/observe.js @@ -4,7 +4,7 @@ * A lightweight, and easy-to-use, JavaScript library for observing any kind of JS object, or HTML DOM element, to detect changes. * * @file observe.js - * @version v0.4.0 + * @version v0.5.0 * @author Bunoon * @license MIT License * @copyright Bunoon 2023 @@ -658,7 +658,7 @@ * @returns {string} The version number. */ this.getVersion = function() { - return "0.4.0"; + return "0.5.0"; }; From 612c52c4d4d1a2c49d733f5da3a7bdef16728382 Mon Sep 17 00:00:00 2001 From: William Troup Date: Thu, 4 Jan 2024 22:14:57 +0000 Subject: [PATCH 2/9] Minor documentation improvements. --- docs/PUBLIC_FUNCTIONS.md | 1 - docs/binding/options/CUSTOM_TRIGGERS.md | 2 -- docs/binding/options/OPTIONS.md | 4 +--- docs/configuration/OPTIONS.md | 3 +-- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/PUBLIC_FUNCTIONS.md b/docs/PUBLIC_FUNCTIONS.md index 853b9c3..e8dc00e 100644 --- a/docs/PUBLIC_FUNCTIONS.md +++ b/docs/PUBLIC_FUNCTIONS.md @@ -86,7 +86,6 @@ Returns the version of Observe.js. ## Example: -
```markdown