-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js.map
1 lines (1 loc) · 21.8 KB
/
index.js.map
1
{"version":3,"file":"index.js","sources":["src/util/create.js","src/util/streamable.js","src/util/alias.js","src/util/type.js","src/stream.js","src/index.js"],"sourcesContent":["/**\n * Create a dictionary object, by default without a preexisting prototype chain\n * @param {Object} obj - An object with properties to assign to the empty object\n * @return {Object} The empty object with the assigned properties\n */\nexport const create = (obj, proto = null) => Object.assign(Object.create(proto), obj);\n","import { create } from 'util/create';\n\n/**\n * This signifies that the streamable function registers an event listener\n * @type {number}\n */\nexport const ADD = 1;\n\n/**\n * This signifies that the streamable function removes an event listener\n * @type {number}\n */\nexport const REMOVE = -1;\n\n/**\n * The list of streamable properties with their corresponding callback index\n */\nexport const streamableRegistry = create({\n addEventListener: {\n callbackIndex: 1,\n type: ADD,\n },\n removeEventListener: {\n callbackIndex: 1,\n type: REMOVE,\n },\n setTimeout: {\n callbackIndex: 0,\n type: ADD,\n },\n clearTimeout: {\n callbackIndex: 0,\n type: REMOVE,\n },\n setInterval: {\n callbackIndex: 0,\n type: ADD,\n },\n clearInterval: {\n callbackIndex: 0,\n type: REMOVE,\n },\n on: { // jQuery, EventEmitter\n callbackIndex: 1,\n type: ADD,\n },\n off: { // jQuery\n callbackIndex: 1,\n type: REMOVE,\n }, // EventEmitter\n removeListener: {\n callbackIndex: 1,\n type: REMOVE,\n },\n});\n\n/**\n * Check if a function name is in the list of streamables\n * @param {string} name - The function name\n * @return {boolean} Whether it is in the list or not\n */\nexport const isStreamable = name => !!streamableRegistry[name];\n\n/**\n * Get an event function signature from the streamable list\n * @param {string} name - The name of the function\n * @return {Object} The function signature\n */\nexport const getStreamable = (name) => streamableRegistry[name];\n\n/**\n * Add an event function to the streamable list\n * @param {string} name - The name of the function\n * @param {Object} config - The original function name\n * @param {number|null} config.callbackIndex - The nth parameter where the callback goes (zero-based)\n * @param {(ADD|REMOVE)} config.type - Is it an ADD or REMOVE action\n * @return {boolean} Success or failure\n */\nexport const addStreamable = (name, config) => !streamableRegistry[name] ? !!(streamableRegistry[name] = config) : false;\n","import { create } from 'util/create';\n\n/**\n * The list of shorthand aliases for functions\n */\nexport const aliasRegistry = create({\n add: 'addEventListener',\n remove: 'removeEventListener',\n});\n\n/**\n * Seek the function name for an alias\n * @param {String} alias - The alias to be sought\n * @return {String} The real function name\n */\nexport const getAlias = alias => aliasRegistry[alias] ? aliasRegistry[alias] : alias;\n\n/**\n * Add an alias for an existing function name\n * @param {String} alias - The alias to add\n * @param {String} name - The original function name\n * @return {Boolean} Success or failure\n */\nexport const addAlias = (alias, name) => !aliasRegistry[alias] ? !!(aliasRegistry[alias] = name) : false;\n","/**\n * The object recognition regex\n * @type {RegExp}\n */\nconst objectRegex = /^\\[object/;\n\n/**\n * Check if a value is an object (functions count as well)\n * @param {*} obj - The value to be checked\n * @return {boolean}\n */\nexport const isObject = obj => objectRegex.test(Object.prototype.toString.call(obj));\n\n/**\n * Check if a value is a function\n * @param {*} fn - The value to be checked\n * @return {boolean}\n */\nexport const isFunction = fn => typeof fn === 'function';\n\n/**\n * Check if a value is a number (only number primitives)\n * @param {*} number - The value to be checked\n * @return {boolean}\n */\nexport const isNumber = number => number === Number(number);\n\n/**\n * Check if a value is a common iterable\n * @param {*} obj - The value to be check\n * @return {boolean}\n */\nexport const isIterable = obj => isFunction(obj[Symbol.iterator]);\n","import { create } from 'util/create';\n\n/**\n * A symbol to mark all stream instances\n * @type {Symbol}\n */\nexport const $$stream = Symbol('stroxy-stream');\n\n\n/**\n * Remove an entry from an array\n * @param {*} entry - The entry to be removed from the array\n * @param {Array} array - The array from which to remove the entry\n * @returns {Array}\n */\nfunction removeEntry(entry, array) {\n array = array.slice();\n const index = array.indexOf(entry);\n array.splice(index, 1);\n return array;\n}\n\n/**\n * Run an array of stream instances\n * Should only be called from child instances (with pipes)\n * @param {Array} instances - The list of instances\n * @param {*} value - The current value of the parent\n */\nfunction runInstances(instances, value) {\n instances = instances.slice();\n return instances.map((instance) => {\n instance._value = instance.pipes.reduce((val, fn) => {\n return fn(val, value);\n }, value);\n return instance;\n });\n}\n\n/**\n * Run all value listeners in the same order as they were registered\n * @param {Object} stream - The stream (parent) instance\n */\nfunction runValueListeners(stream) {\n stream.valueListeners.forEach(({listener, instance}) => {\n listener(instance._value);\n });\n}\n\n/**\n * Get the current (parent) stream, from either a parent or a child stream\n * @param {Object} thisValue - The stream (parent) instance\n * @return { Object } - The correct context for managing instances and value listeners\n */\nfunction getContext(thisValue) {\n return thisValue.parent ? thisValue.parent : thisValue;\n}\n\n\n/**\n * The prototypal object for both parent and child streams\n */\nexport const streamProto = {\n /**\n * Mark every stream and child stream (through the prototype chain) as such\n */\n [$$stream]: true,\n /**\n * The list of instances on the parent\n */\n instances: [],\n /**\n * The list of value listeners on the parent and child streams\n */\n valueListeners: [],\n /**\n * Add a pipe to the current stream\n * If there are no prior pipes, a child instance for the pipes is created\n * @param {Function} fn - The function to be called in the pipe\n * @returns {Object} The stream instance\n */\n pipe(fn) {\n if (!this.parent) {\n const instance = create({\n _value: this._value,\n parent: this,\n pipes: [fn],\n valueOf: null,\n }, this);\n\n this.instances.push(instance);\n\n return instance;\n }\n\n this.pipes.push(fn);\n return this;\n },\n /**\n * Register a listener to be called when the event is triggered and the value thus changed\n * @param {Function} listener - The listener function\n */\n onValue(listener) {\n const context = getContext(this);\n\n context.valueListeners.push({\n listener,\n instance: this,\n });\n },\n /**\n * Remove a valuelistener\n * @param {Function} listener - The listener function\n */\n offValue(listener) {\n const context = getContext(this);\n\n context.valueListeners = removeEntry(listener, context.valueListeners);\n },\n /**\n * Remove a child stream from the loop\n * @param {Object} instance - The child stream to be removed\n */\n remove(instance) {\n if (this.parent) {\n console.warn('Cannot remove child stream from another child stream.'\n + 'Did you want to remove it from the parent stream?');\n return false;\n }\n\n this.instances = removeEntry(instance, this.instances);\n\n this.valueListeners = this.valueListeners.filter(({ instance: listenerInstance }) => {\n return listenerInstance !== instance;\n });\n },\n /**\n * Returns an event listener which can be registered by event registering functions\n * Could also be manually registered if so desired\n * @returns {Function} The actual event listener\n */\n event() {\n if (this.eventFunction) {\n return this.eventFunction;\n }\n\n return this.eventFunction = (value) => {\n if (this.parent) {\n console.warn(`Child streams can't have their own event listeners.`);\n return false;\n }\n\n this._value = value;\n\n this.instances = runInstances(this.instances, value);\n\n runValueListeners(this);\n };\n },\n};\n\n\n/**\n * Creates a new stream instance\n * Primarily used in the stroxy function\n * @returns {Object} The freshly created stream\n */\nexport function createStream() {\n return create({\n instances: [],\n valueListeners: [],\n }, streamProto);\n}\n","import { ADD, REMOVE, isStreamable, getStreamable, addStreamable } from 'util/streamable';\nimport { getAlias, addAlias } from 'util/alias';\nimport { isObject, isFunction, isNumber, isIterable } from 'util/type';\n\nimport { createStream } from 'stream';\n\n/**\n * A symbol to mark all stroxified objects\n * @type {Symbol}\n */\nconst $$stroxy = Symbol('stroxy');\n\n/**\n * Is called when `get` property name is one of the event handler ones\n * @param {Object} target - The dom node on which the listener sits\n * @param {string} property - The event function name (e.g. addEventListener)\n * @returns {Object|undefined} The stream for the current event or nothing in a removal event\n */\nfunction applyListener(target, property) {\n const targetIterable = isIterable(target);\n const fn = targetIterable ? target[0][property] : target[property];\n\n if (!isFunction(fn)) {\n return target[property];\n }\n \n return function (...args) {\n let stream, value;\n const { type, callbackIndex } = getStreamable(property);\n\n // Splice the stream into the arguments list\n // If a callbackIndex is defined\n if (isNumber(callbackIndex)) {\n if (type === ADD) {\n stream = createStream();\n } else {\n [stream] = args.splice(callbackIndex, 1);\n\n if (stream.parent) {\n stream.parent.remove(stream);\n return;\n }\n }\n\n const event = stream.event().hasOwnProperty('valueOf') ? stream.event().valueOf() : stream.event();\n\n args.splice(callbackIndex, null, event);\n }\n\n // Apply for all targets entries if it is a NodeList or an Array\n if (targetIterable) {\n Array.from(target).forEach((node) => {\n Reflect.apply(node[property], node, args);\n });\n } else {\n value = Reflect.apply(target[property], target, args);\n\n if (stream && value != null) {\n stream.event().valueOf = x => value;\n }\n }\n\n return stream;\n }\n}\n\n/**\n * The core wrapper function\n * Pass in an object (e.g. document) and the event will be\n * @param {Object|Function} obj - The object or function which should be stroxified\n * @param {string} prop - The property name to be used on the object, mainly used for recursive calls\n * @returns {Object|Function} The stroxified object or function\n */\nfunction stroxy(obj, prop) {\n return new Proxy(prop ? obj[prop] : obj, {\n get(target, property) {\n const result = target[property];\n const name = getAlias(property);\n \n if (isStreamable(name)) {\n return applyListener(target, name);\n }\n\n // Confirm that this is a stroxified object\n if (property === $$stroxy) {\n return true;\n }\n\n if (isObject(result)) {\n return stroxy(target, property);\n }\n\n return result;\n },\n apply(target, context, args) {\n const res = Reflect.apply(target, obj, args);\n\n if (isObject(res)) {\n return stroxy(res);\n }\n\n return res;\n },\n });\n}\n\nstroxy = Object.assign(stroxy, {\n addStreamable,\n addAlias,\n ADD,\n REMOVE,\n});\n\nif (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = exports.default = stroxy;\n} else if (typeof window === 'object') {\n window.stroxy = stroxy;\n}"],"names":[],"mappings":";;;EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAO,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;;ECHtF;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAO,MAAM,GAAG,GAAG,CAAC,CAAC;;AAErB,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAO,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC;;AAEzB,EAAA;AACA,EAAA;AACA,EAAA;AACA,EAAO,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACzC,EAAA,EAAE,gBAAgB,EAAE;AACpB,EAAA,IAAI,aAAa,EAAE,CAAC;AACpB,EAAA,IAAI,IAAI,EAAE,GAAG;AACb,EAAA,GAAG;AAC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