Skip to content

Commit

Permalink
Merge 8dee542 into e188514
Browse files Browse the repository at this point in the history
  • Loading branch information
DarrenPaulWright committed Mar 11, 2019
2 parents e188514 + 8dee542 commit 50a8767
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

## [0.4.1] - 2019-3-11
### Changed
- Fixed bug in methods where the init value could get modified.

## [0.4.0] - 2019-3-11
### Added
- Float type (check, enforcer, and method)
Expand Down Expand Up @@ -119,6 +123,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial enforcers, methods, and documentation

[0.4.1]: https://github.com/DarrenPaulWright/type-enforcer/compare/v0.4.0...c0.4.1
[0.4.0]: https://github.com/DarrenPaulWright/type-enforcer/compare/v0.3.3...c0.4.0
[0.3.3]: https://github.com/DarrenPaulWright/type-enforcer/compare/v0.3.2...c0.3.3
[0.3.2]: https://github.com/DarrenPaulWright/type-enforcer/compare/v0.3.1...c0.3.2
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "type-enforcer",
"version": "0.4.0",
"version": "0.4.1",
"description": "Type enforcement library for javascript",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/methods/types/methodAny.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepEqual } from 'object-agent';
import { clone, deepEqual } from 'object-agent';
import isArray from '../../checks/types/isArray';
import enforceBoolean from '../../enforcer/types/enforceBoolean';
import before from '../variants/before';
Expand Down Expand Up @@ -65,7 +65,7 @@ export const buildMethod = (defaultSettings = {}, onInit) => {
return (options) => {
let method;

options = Object.assign({}, defaultSettings, options);
options = Object.assign(clone(defaultSettings), options);
if (onInit) {
options = onInit(options);
}
Expand Down

0 comments on commit 50a8767

Please sign in to comment.