How to use the object-assign.default function in object-assign

To help you get started, we’ve selected a few object-assign examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nojaf / redux-knockoutjs / src / reducers / index.ts View on Github external
function updatedErrorState(initialState:IApplicationState, error:string, resetValue:string):IApplicationState{
	const errors = (initialState.errors ? addError(initialState.errors, error) : [error]);
	return objectAssign({}, initialState, {errors, [resetValue]:0});
}
github nojaf / redux-knockoutjs / src / reducers / index.ts View on Github external
function changeColor(initialState:IApplicationState, color:string){
	return objectAssign({}, initialState, {"color":color});
}
github nojaf / redux-knockoutjs / src / reducers / index.ts View on Github external
function changeWidth(initialState:IApplicationState, width:any):IApplicationState {
	if(isValidNumeric(width)){
		return updatedErrorState(initialState, widthError, "width");
	}
	
	const errors = removeError(initialState.errors, widthError);
	return objectAssign({}, initialState, {width,errors});
}
github nojaf / redux-knockoutjs / src / reducers / index.ts View on Github external
function changeHeight(initialState:IApplicationState, height:any):IApplicationState {
	if(isValidNumeric(height)){
		return updatedErrorState(initialState, heightError, "height");
	}
	
	const errors = removeError(initialState.errors, heightError);	
	return objectAssign({}, initialState, {height, errors});
}

object-assign

ES2015 `Object.assign()` ponyfill

MIT
Latest version published 7 years ago

Package Health Score

77 / 100
Full package analysis