-
Notifications
You must be signed in to change notification settings - Fork 0
/
stampit.js.map
1 lines (1 loc) · 26.2 KB
/
stampit.js.map
1
{"version":3,"file":"stampit.umd.js","sources":["../src/merge.js","../src/is-function.js","../src/is-object.js","../src/utils.js","../src/standardise-descriptor.js","../src/compose.js","../src/isStamp.js","../src/stampit.js"],"sourcesContent":["import {isArray, isObject, isPlainObject} from './utils';\n\n/**\n * The 'src' argument plays the command role.\n * The returned values is always of the same type as the 'src'.\n * @param dst\n * @param src\n * @returns {*}\n */\nfunction mergeOne(dst, src) {\n if (src === undefined) return dst;\n\n // According to specification arrays must be concatenated.\n // Also, the '.concat' creates a new array instance. Overrides the 'dst'.\n if (isArray(src)) return (isArray(dst) ? dst : []).concat(src);\n\n // Now deal with non plain 'src' object. 'src' overrides 'dst'\n // Note that functions are also assigned! We do not deep merge functions.\n if (!isPlainObject(src)) return src;\n\n // See if 'dst' is allowed to be mutated. If not - it's overridden with a new plain object.\n const returnValue = isObject(dst) ? dst : {};\n\n const keys = Object.keys(src);\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n\n const srcValue = src[key];\n // Do not merge properties with the 'undefined' value.\n if (srcValue !== undefined) {\n const dstValue = returnValue[key];\n // Recursive calls to mergeOne() must allow only plain objects or arrays in dst\n const newDst = isPlainObject(dstValue) || isArray(srcValue) ? dstValue : {};\n\n // deep merge each property. Recursion!\n returnValue[key] = mergeOne(newDst, srcValue);\n }\n }\n\n return returnValue;\n}\n\nexport default function (dst, ...srcs) {\n return srcs.reduce(mergeOne, dst);\n}\n","export default function isFunction(obj) {\n return typeof obj === 'function';\n}\n","export default function isObject(obj) {\n const type = typeof obj;\n return !!obj && (type === 'object' || type === 'function');\n}\n","import merge from './merge';\nimport isFunction from './is-function';\nimport isObject from './is-object';\n\nexport {isFunction};\nexport {isObject};\n\nexport const assign = Object.assign;\nexport const isArray = Array.isArray;\n\nexport function isPlainObject(value) {\n return !!value && typeof value === 'object' &&\n Object.getPrototypeOf(value) === Object.prototype;\n}\n\n\nconst concat = Array.prototype.concat;\nexport function extractFunctions() {\n const fns = concat.apply([], arguments).filter(isFunction);\n return fns.length === 0 ? undefined : fns;\n}\n\nexport function concatAssignFunctions(dstObject, srcArray, propName) {\n if (!isArray(srcArray)) return;\n\n const length = srcArray.length;\n const dstArray = dstObject[propName] || [];\n dstObject[propName] = dstArray;\n for (let i = 0; i < length; i += 1) {\n const fn = srcArray[i];\n if (isFunction(fn) && dstArray.indexOf(fn) < 0) {\n dstArray.push(fn);\n }\n }\n}\n\n\nfunction combineProperties(dstObject, srcObject, propName, action) {\n if (!isObject(srcObject[propName])) return;\n if (!isObject(dstObject[propName])) dstObject[propName] = {};\n action(dstObject[propName], srcObject[propName]);\n}\n\nexport function deepMergeAssign(dstObject, srcObject, propName) {\n combineProperties(dstObject, srcObject, propName, merge);\n}\nexport function mergeAssign(dstObject, srcObject, propName) {\n combineProperties(dstObject, srcObject, propName, assign);\n}\n","import {assign, isObject, extractFunctions, concatAssignFunctions} from './utils';\nimport merge from './merge';\n\n/**\n * Converts stampit extended descriptor to a standard one.\n * @param [methods]\n * @param [properties]\n * @param [props]\n * @param [refs]\n * @param [initializers]\n * @param [init]\n * @param [deepProperties]\n * @param [deepProps]\n * @param [propertyDescriptors]\n * @param [staticProperties]\n * @param [statics]\n * @param [staticDeepProperties]\n * @param [deepStatics]\n * @param [staticPropertyDescriptors]\n * @param [configuration]\n * @param [conf]\n * @param [deepConfiguration]\n * @param [deepConf]\n * @param [composers]\n * @returns {Descriptor}\n */\nexport default function ({\n methods,\n\n properties,\n props,\n refs,\n\n initializers,\n init,\n\n composers,\n\n deepProperties,\n deepProps,\n\n propertyDescriptors,\n\n staticProperties,\n statics,\n\n staticDeepProperties,\n deepStatics,\n\n staticPropertyDescriptors,\n\n configuration,\n conf,\n\n deepConfiguration,\n deepConf\n} = {}) {\n const p = isObject(props) || isObject(refs) || isObject(properties) ?\n assign({}, props, refs, properties) : undefined;\n\n let dp = isObject(deepProps) ? merge({}, deepProps) : undefined;\n dp = isObject(deepProperties) ? merge(dp, deepProperties) : dp;\n\n const sp = isObject(statics) || isObject(staticProperties) ?\n assign({}, statics, staticProperties) : undefined;\n\n let dsp = isObject(deepStatics) ? merge({}, deepStatics) : undefined;\n dsp = isObject(staticDeepProperties) ? merge(dsp, staticDeepProperties) : dsp;\n\n const c = isObject(conf) || isObject(configuration) ?\n assign({}, conf, configuration) : undefined;\n\n let dc = isObject(deepConf) ? merge({}, deepConf) : undefined;\n dc = isObject(deepConfiguration) ? merge(dc, deepConfiguration) : dc;\n\n const ii = extractFunctions(init, initializers);\n\n const composerFunctions = extractFunctions(composers);\n if (composerFunctions) {\n dc = dc || {};\n concatAssignFunctions(dc, composerFunctions, 'composers');\n }\n\n const descriptor = {};\n if (methods) descriptor.methods = methods;\n if (p) descriptor.properties = p;\n if (ii) descriptor.initializers = ii;\n if (dp) descriptor.deepProperties = dp;\n if (sp) descriptor.staticProperties = sp;\n if (methods) descriptor.methods = methods;\n if (dsp) descriptor.staticDeepProperties = dsp;\n if (propertyDescriptors) descriptor.propertyDescriptors = propertyDescriptors;\n if (staticPropertyDescriptors) descriptor.staticPropertyDescriptors = staticPropertyDescriptors;\n if (c) descriptor.configuration = c;\n if (dc) descriptor.deepConfiguration = dc;\n\n return descriptor;\n}\n","import isComposable from './isComposable';\nimport merge from './merge';\nimport {isFunction, isObject, assign, concatAssignFunctions, mergeAssign, deepMergeAssign} from './utils';\n\n/**\n * Creates new factory instance.\n * @param {Descriptor} descriptor The information about the object the factory will be creating.\n * @returns {Function} The new factory function.\n */\nfunction createFactory(descriptor) {\n return function Stamp(options, ...args) {\n // Next line was optimized for most JS VMs. Please, be careful here!\n let obj = Object.create(descriptor.methods || null);\n\n merge(obj, descriptor.deepProperties);\n assign(obj, descriptor.properties);\n Object.defineProperties(obj, descriptor.propertyDescriptors || {});\n\n if (!descriptor.initializers || descriptor.initializers.length === 0) return obj;\n\n if (options === undefined) options = {};\n const inits = descriptor.initializers;\n const length = inits.length;\n for (let i = 0; i < length; i += 1) {\n const initializer = inits[i];\n if (isFunction(initializer)) {\n const returnedValue = initializer.call(obj, options,\n {instance: obj, stamp: Stamp, args: [options].concat(args)});\n obj = returnedValue === undefined ? obj : returnedValue;\n }\n }\n\n return obj;\n };\n}\n\n/**\n * Returns a new stamp given a descriptor and a compose function implementation.\n * @param {Descriptor} [descriptor={}] The information about the object the stamp will be creating.\n * @param {Compose} composeFunction The \"compose\" function implementation.\n * @returns {Stamp}\n */\nfunction createStamp(descriptor, composeFunction) {\n const Stamp = createFactory(descriptor);\n\n merge(Stamp, descriptor.staticDeepProperties);\n assign(Stamp, descriptor.staticProperties);\n Object.defineProperties(Stamp, descriptor.staticPropertyDescriptors || {});\n\n const composeImplementation = isFunction(Stamp.compose) ? Stamp.compose : composeFunction;\n Stamp.compose = function _compose(...args) {\n return composeImplementation.apply(this, args);\n };\n assign(Stamp.compose, descriptor);\n\n return Stamp;\n}\n\n/**\n * Mutates the dstDescriptor by merging the srcComposable data into it.\n * @param {Descriptor} dstDescriptor The descriptor object to merge into.\n * @param {Composable} [srcComposable] The composable\n * (either descriptor or stamp) to merge data form.\n * @returns {Descriptor} Returns the dstDescriptor argument.\n */\nfunction mergeComposable(dstDescriptor, srcComposable) {\n const srcDescriptor = (srcComposable && srcComposable.compose) || srcComposable;\n if (!isComposable(srcDescriptor)) return dstDescriptor;\n\n mergeAssign(dstDescriptor, srcDescriptor, 'methods');\n mergeAssign(dstDescriptor, srcDescriptor, 'properties');\n deepMergeAssign(dstDescriptor, srcDescriptor, 'deepProperties');\n mergeAssign(dstDescriptor, srcDescriptor, 'propertyDescriptors');\n mergeAssign(dstDescriptor, srcDescriptor, 'staticProperties');\n deepMergeAssign(dstDescriptor, srcDescriptor, 'staticDeepProperties');\n mergeAssign(dstDescriptor, srcDescriptor, 'staticPropertyDescriptors');\n mergeAssign(dstDescriptor, srcDescriptor, 'configuration');\n deepMergeAssign(dstDescriptor, srcDescriptor, 'deepConfiguration');\n concatAssignFunctions(dstDescriptor, srcDescriptor.initializers, 'initializers');\n\n return dstDescriptor;\n}\n\n/**\n * Given the list of composables (stamp descriptors and stamps) returns\n * a new stamp (composable factory function).\n * @typedef {Function} Compose\n * @param {...(Composable)} [composables] The list of composables.\n * @returns {Stamp} A new stamp (aka composable factory function)\n */\nexport default function compose(...composables) {\n const descriptor = [this]\n .concat(composables)\n .filter(isObject)\n .reduce(mergeComposable, {});\n return createStamp(descriptor, compose);\n}\n\n\n/**\n * The Stamp Descriptor\n * @typedef {Function|Object} Descriptor\n * @returns {Stamp} A new stamp based on this Stamp\n * @property {Object} [methods] Methods or other data used as object instances' prototype\n * @property {Array<Function>} [initializers] List of initializers called for each object instance\n * @property {Object} [properties] Shallow assigned properties of object instances\n * @property {Object} [deepProperties] Deeply merged properties of object instances\n * @property {Object} [staticProperties] Shallow assigned properties of Stamps\n * @property {Object} [staticDeepProperties] Deeply merged properties of Stamps\n * @property {Object} [configuration] Shallow assigned properties of Stamp arbitrary metadata\n * @property {Object} [deepConfiguration] Deeply merged properties of Stamp arbitrary metadata\n * @property {Object} [propertyDescriptors] ES5 Property Descriptors applied to object instances\n * @property {Object} [staticPropertyDescriptors] ES5 Property Descriptors applied to Stamps\n */\n\n/**\n * The Stamp factory function\n * @typedef {Function} Stamp\n * @returns {*} Instantiated object\n * @property {Descriptor} compose - The Stamp descriptor and composition function\n */\n\n/**\n * A composable object - stamp or descriptor\n * @typedef {Stamp|Descriptor} Composable\n */\n\n","import isFunction from './is-function';\n\n/**\n * Returns true if argument is a stamp.\n * @param {*} obj\n * @returns {Boolean}\n */\nexport default function isStamp(obj) {\n return isFunction(obj) && isFunction(obj.compose);\n}\n","import standardiseDescriptor from './standardise-descriptor';\nimport {isArray, isFunction, assign, extractFunctions} from './utils';\nimport merge from './merge';\nimport compose from './compose';\nimport isComposable from './isComposable';\nimport isStamp from './isStamp';\n\nfunction createUtilityFunction(propName, action) {\n return function composeUtil() {\n return ((this && this.compose) || stampit).call(this, {\n [propName]: action({}, ...arguments)\n });\n };\n}\n\nexport const methods = createUtilityFunction('methods', assign);\n\nexport const properties = createUtilityFunction('properties', assign);\nexport {properties as refs};\nexport {properties as props};\n\nexport function initializers(...args) {\n return ((this && this.compose) || stampit).call(this, {\n initializers: extractFunctions(...args)\n });\n}\nexport {initializers as init};\n\nexport function composers(...args) {\n return ((this && this.compose) || stampit).call(this, {\n composers: extractFunctions(...args)\n });\n}\n\nexport const deepProperties = createUtilityFunction('deepProperties', merge);\nexport {deepProperties as deepProps};\n\nexport const staticProperties = createUtilityFunction('staticProperties', assign);\nexport {staticProperties as statics};\n\nexport const staticDeepProperties = createUtilityFunction('staticDeepProperties', merge);\nexport {staticDeepProperties as deepStatics};\n\nexport const configuration = createUtilityFunction('configuration', assign);\nexport {configuration as conf};\n\nexport const deepConfiguration = createUtilityFunction('deepConfiguration', merge);\nexport {deepConfiguration as deepConf};\n\nexport const propertyDescriptors = createUtilityFunction('propertyDescriptors', assign);\n\nexport const staticPropertyDescriptors = createUtilityFunction('staticPropertyDescriptors', assign);\n\nconst allUtilities = {\n methods,\n\n properties,\n refs: properties,\n props: properties,\n\n initializers,\n init: initializers,\n\n composers,\n\n deepProperties,\n deepProps: deepProperties,\n\n staticProperties,\n statics: staticProperties,\n\n staticDeepProperties,\n deepStatics: staticDeepProperties,\n\n configuration,\n conf: configuration,\n\n deepConfiguration,\n deepConf: deepConfiguration,\n\n propertyDescriptors,\n\n staticPropertyDescriptors\n};\n\n/**\n * Infected stamp. Used as a storage of the infection metadata\n * @type {Function}\n * @return {Stamp}\n */\nconst baseStampit = compose(\n {staticProperties: allUtilities},\n {\n staticProperties: {\n create(...args) {\n return this(...args);\n },\n compose: stampit // infecting\n }\n }\n);\n\n/**\n * Infected compose\n * @param {...(Composable)} [args] The list of composables.\n * @return {Stamp}\n */\nfunction stampit(...args) {\n const composables = args.filter(isComposable)\n .map(arg => isStamp(arg) ? arg : standardiseDescriptor(arg));\n\n // Calling the standard pure compose function here.\n let stamp = compose.apply(this || baseStampit, composables);\n\n const composerFunctions = stamp.compose.deepConfiguration &&\n stamp.compose.deepConfiguration.composers;\n if (isArray(composerFunctions) && composerFunctions.length > 0) {\n const uniqueComposers = [];\n for (let i = 0; i < composerFunctions.length; i += 1) {\n const composer = composerFunctions[i];\n if (isFunction(composer) && !uniqueComposers.includes(composer)) {\n uniqueComposers.push(composer);\n }\n }\n stamp.compose.deepConfiguration.composers = uniqueComposers;\n\n if (isStamp(this)) composables.unshift(this);\n for (let i = 0; i < uniqueComposers.length; i += 1) {\n const composer = uniqueComposers[i];\n const returnedValue = composer({stamp, composables});\n stamp = isStamp(returnedValue) ? returnedValue : stamp;\n }\n }\n\n return stamp;\n}\n\nconst exportedCompose = stampit.bind(); // bind to 'undefined'\nexport {exportedCompose as compose};\nstampit.compose = exportedCompose;\n\n// Setting up the shortcut functions\nexport default assign(stampit, allUtilities);\n"],"names":["const","let","isComposable","i","composer"],"mappings":";;;;;;;;;;;;;AASA,SAAS,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE;EAC1B,IAAI,GAAG,KAAK,SAAS,EAAE,EAAA,OAAO,GAAG,CAAC,EAAA;;;;EAIlC,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,EAAA,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAA;;;;EAI/D,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,EAAA,OAAO,GAAG,CAAC,EAAA;;;EAGpCA,IAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;;EAE7CA,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;EAC9B,KAAKC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;IACvCD,IAAM,GAAG,GAAG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