1
0
Fork 0

💥 pattern.mergeSettings() is now pattern.appy()

This commit is contained in:
Joost De Cock 2018-12-22 11:14:42 +01:00
parent 6ad8cb6cb0
commit 1d29b12953
2 changed files with 7 additions and 5 deletions

View file

@ -87,7 +87,7 @@ export default function Pattern(config = { options: {} }) {
}
// Merges settings object with this.settings
Pattern.prototype.mergeSettings = function(settings) {
Pattern.prototype.apply = function(settings) {
for (let key of Object.keys(settings)) {
if (Array.isArray(settings[key])) {
if (Array.isArray(this.settings[key])) {
@ -100,6 +100,8 @@ Pattern.prototype.mergeSettings = function(settings) {
};
} else this.settings[key] = settings[key];
}
return this;
};
Pattern.prototype.runHooks = function(hookName, data = false) {