This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
13 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import { warn } from '@ember/debug'; | ||
import { helper } from '@ember/component/helper'; | ||
|
||
const name = '-assert-implicit-component-helper-argument'; | ||
function helperFn(params) { | ||
const [node, error] = params; | ||
warn(error); | ||
return node; | ||
} | ||
|
||
const helperFn = { | ||
[name](params) { | ||
const [node, error] = params; | ||
warn(error); | ||
return node; | ||
}, | ||
}[name]; | ||
// https://github.com/emberjs/ember.js/issues/17154 | ||
Object.defineProperty(helperFn, 'name', { | ||
value: '-assert-implicit-component-helper-argument', | ||
}); | ||
|
||
export default helper(helperFn); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { assign } from '@ember/polyfills'; | ||
import { validateFormat } from 'ember-changeset-validations/validators'; | ||
|
||
export const regex = /^(xrb|nano)(_|-)[13]((?![lv])[a-z1-9]){59}$/; | ||
|
||
export default function validateAccount(options = {}) { | ||
return validateFormat(Object.assign({}, options, { regex })); | ||
return validateFormat(assign({}, options, { regex })); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { assign } from '@ember/polyfills'; | ||
import { validateFormat } from 'ember-changeset-validations/validators'; | ||
|
||
export const regex = /^[a-fA-F0-9]{64}$/; | ||
|
||
export default function validateSeed(options = {}) { | ||
return validateFormat(Object.assign({}, options, { regex })); | ||
return validateFormat(assign({}, options, { regex })); | ||
} |