@@ -11,9 +11,9 @@ function isPlainObject(value) {
1111}
1212
1313/**
14- * Returns true if argument is a stamp .
14+ * Returns true if argument is a Stamp .
1515 * @param {* } obj Any object
16- * @returns {Boolean } True is the obj is a stamp
16+ * @returns {Boolean } True is the obj is a Stamp
1717 */
1818function isStamp ( obj ) {
1919 return isFunction ( obj ) && isFunction ( obj . compose ) ;
@@ -100,7 +100,7 @@ function createEmptyStamp() {
100100 const descriptor = Stamp . compose || { } ;
101101
102102 // Next line was optimized for most JS VMs. Please, be careful here!
103- // The instance of this stamp
103+ // The instance of this Stamp
104104 let instance = descriptor . methods ? Object . create ( descriptor . methods ) : { } ;
105105
106106 mergeOne ( instance , descriptor . deepProperties ) ;
@@ -112,7 +112,7 @@ function createEmptyStamp() {
112112 if ( ! Array . isArray ( inits ) || inits . length === 0 ) return instance ;
113113
114114 // The spec. says that the first argument to every initializer must be an
115- // empty object if nothing else was given when a stamp was called: Stamp()
115+ // empty object if nothing else was given when a Stamp was called: Stamp()
116116 if ( options === undefined ) options = { } ;
117117
118118 for ( let i = 0 , initializer , returnedValue ; i < inits . length ; ) {
@@ -131,7 +131,7 @@ function createEmptyStamp() {
131131 * Mutates the dstDescriptor by merging the srcComposable data into it.
132132 * @param {Descriptor } dstDescriptor The descriptor object to merge into.
133133 * @param {Composable } [srcComposable] The composable
134- * (either descriptor or stamp ) to merge data form.
134+ * (either descriptor or Stamp ) to merge data form.
135135 * @returns {Descriptor } Returns the dstDescriptor argument.
136136 */
137137function mergeComposable ( dstDescriptor , srcComposable ) {
@@ -169,11 +169,11 @@ function mergeComposable(dstDescriptor, srcComposable) {
169169}
170170
171171/**
172- * Given the list of composables (stamp descriptors and stamps) returns
173- * a new stamp (composable factory function).
172+ * Given the list of composables (Stamp descriptors and stamps) returns
173+ * a new Stamp (composable factory function).
174174 * @typedef {Function } Compose
175- * Parameters: {...Composable} The list of composables.
176- * @returns {Stamp } A new stamp (aka composable factory function)
175+ * @param {...Composable } args The list of composables (aka plain objects and/or other stamps)
176+ * @returns {Stamp } A new Stamp (aka composable factory function)
177177 */
178178function compose ( ...args ) {
179179 // "Composable" is both Descriptor and Stamp.
@@ -208,7 +208,7 @@ function compose(...args) {
208208/**
209209 * The Stamp Descriptor
210210 * @typedef {Function|Object } Descriptor
211- * @returns {Stamp } A new stamp based on this Stamp
211+ * @returns {Stamp } A new Stamp based on this Stamp
212212 * @property {Object } [methods] Methods or other data used as object instances' prototype
213213 * @property {Array<Function> } [initializers] List of initializers called for each object instance
214214 * @property {Object } [properties] Shallow assigned properties of object instances
@@ -229,7 +229,7 @@ function compose(...args) {
229229 */
230230
231231/**
232- * A composable object - stamp or descriptor
232+ * A composable object - Stamp or descriptor
233233 * @typedef {Stamp|Descriptor } Composable
234234 */
235235
@@ -353,9 +353,9 @@ staticUtils.conf = staticUtils.configuration;
353353staticUtils . deepConf = staticUtils . deepConfiguration ;
354354
355355/**
356- * Infected compose
357- * Parameters: {...Composable} The list of composables.
358- * @return {Stamp } The Stampit -flavoured stamp
356+ * Create and return a Stamp.
357+ * @param {...Composable } args The list of composables (aka plain objects and/or other stamps)
358+ * @return {Stamp } The stampit -flavoured Stamp
359359 */
360360export default function stampit ( ...args ) {
361361 return compose ( this , { staticProperties : staticUtils } , ...args . map ( standardiseDescriptor ) ) ;
0 commit comments