CARVIEW |
Select Language
HTTP/2 301
location: https://raw.githubusercontent.com/pluma/obs/master/dist/obs.amd.min.js
accept-ranges: bytes
age: 0
date: Thu, 24 Jul 2025 19:32:50 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210028-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753385570.572195,VS0,VE1199
vary: Accept-Encoding
x-fastly-request-id: b02d0330b74f23620e62925f558b89e32a00b0ad
content-length: 0
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: W/"eff36d1711ae299fc26c65c046798acddd7d33f1f5801d2c114159f1c9869986"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: E55F:35BCBB:2C842:6B3CC:68828A5D
content-encoding: gzip
accept-ranges: bytes
date: Thu, 24 Jul 2025 19:32:51 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210049-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753385571.827794,VS0,VE262
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
x-fastly-request-id: 536803ae2c34f9059e8a4829028fd1c0cd67be84
expires: Thu, 24 Jul 2025 19:37:51 GMT
source-age: 0
content-length: 1161
define(function(require,exports,module){"use strict";var PubSub=require("sublish").PubSub,slice=Array.prototype.slice,isArray=Array.isArray?Array.isArray:function(arr){return Object.prototype.toString.call(arr)==="[object Array]"},contains=Array.prototype.indexOf?function(arr,el){return!!~arr.indexOf(el)}:function(arr,el){for(var i=0;i1){if(typeof args[1]==="function"){config.write=args[1];if(args.length>2){config.watch=args[2]}}else{config.watch=args[1]}}}return config}function obs(config){function observable(value){if(arguments.length){if(typeof observable.write==="function"){observable.write.call(observable.context,value)}else{throw new Error("This observable cannot be written to!")}}else{if(typeof observable.read==="function"){return observable.read.call(observable.context)}else{throw new Error("This observable cannot be read from!")}}}ext(observable,PubSub.prototype,{context:config.context||observable,read:config.read,write:config.write,onNotify:function(onNotify){return function(){onNotify.call(observable)}}(config.onNotify||function(){}),_initialValue:config.value,_currentValue:config.value,_previousValue:undefined,_subscriptions:[]},obs.fn);PubSub.apply(observable);if(config.watch){observable.watch.apply(observable,isArray(config.watch)?config.watch:[config.watch])}return observable}obs.fn={__is_obs__:true,notify:function(){this.dirty=this._currentValue===this._initialValue;this.publish(this._currentValue,this._previousValue)},peek:function(){return this._currentValue},commit:function(){this._initialValue=this._currentValue;this.dirty=false},reset:function(){this._previousValue=this._currentValue;this._currentValue=this._initialValue;this.notify()},watch:function(){var args=slice.call(arguments,0),sub,i;for(i=0;i