Skip to content

Commit

Permalink
fix spelling of mergeable, #73
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Oct 11, 2019
1 parent ed3bb6b commit 8320e1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions js/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ define( require => {
* @returns {Object}
*/
function merge( target, ...sources ) {
validateMergableObject( target );
validateMergeableObject( target );
assert && assert( sources.length > 0, 'at least one source expected' );

_.each( sources, source => {
if ( source !== undefined ) {
validateMergableObject( source );
validateMergeableObject( source );
for ( const property in source ) {
if ( source.hasOwnProperty( property ) ) {
const sourceProperty = source[ property ];
Expand All @@ -39,7 +39,7 @@ define( require => {
if ( _.endsWith( property, OPTIONS_SUFFIX ) && property !== OPTIONS_SUFFIX ) {

// ensure that the *Options property is a POJSO
validateMergableObject( sourceProperty );
validateMergeableObject( sourceProperty );

target[ property ] = merge( target[ property ] || {}, sourceProperty );
}
Expand All @@ -57,7 +57,7 @@ define( require => {
* Validate that the object is a valid arg, with assertions.
* @param {Object} object
*/
function validateMergableObject( object ) {
function validateMergeableObject( object ) {
assert && assert( object && typeof object === 'object' && Object.getPrototypeOf( object ) === Object.prototype,
'Object should be truthy, an object, and cannot have an extra prototype' );

Expand Down
2 changes: 1 addition & 1 deletion js/mergeTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ define( require => {
assert.ok( original.prop === newObject.prop, 'same Property' );
assert.ok( original.enum === newObject.enum, 'same Enumeration' );

// test defaults with other non mergable objects
// test defaults with other non mergeable objects
newObject = merge( {
prop: testProperty2,
enum: testEnumeration2,
Expand Down

0 comments on commit 8320e1b

Please sign in to comment.