-
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: throws on invalid arguments for prepend/append, fixes #208
- Loading branch information
Showing
13 changed files
with
165 additions
and
115 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
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
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
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,9 +1,7 @@ | ||
import html from './html' | ||
import str from './string' | ||
import math from './math' | ||
import url from './url' | ||
import array from './array' | ||
import date from './date' | ||
import obj from './object' | ||
|
||
export default { ...html, ...str, ...math, ...url, ...date, ...obj, ...array } | ||
export * from './html' | ||
export * from './math' | ||
export * from './url' | ||
export * from './array' | ||
export * from './date' | ||
export * from './object' | ||
export * from './string' |
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
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,11 +1,9 @@ | ||
import { isFalsy } from '../../render/boolean' | ||
import { toValue } from '../../util/underscore' | ||
|
||
export default { | ||
'default': function<T1, T2> (v: string | T1, arg: T2): string | T1 | T2 { | ||
return isFalsy(toValue(v)) || v === '' ? arg : v | ||
}, | ||
'json': function (v: any) { | ||
return JSON.stringify(v) | ||
} | ||
export function Default<T1, T2> (v: string | T1, arg: T2): string | T1 | T2 { | ||
return isFalsy(toValue(v)) || v === '' ? arg : v | ||
} | ||
export function json (v: any) { | ||
return JSON.stringify(v) | ||
} |
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
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,4 +1,2 @@ | ||
export default { | ||
'url_decode': (x: string) => x.split('+').map(decodeURIComponent).join(' '), | ||
'url_encode': (x: string) => x.split(' ').map(encodeURIComponent).join('+') | ||
} | ||
export const urlDecode = (x: string) => x.split('+').map(decodeURIComponent).join(' ') | ||
export const urlEncode = (x: string) => x.split(' ').map(encodeURIComponent).join('+') |
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
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
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
Oops, something went wrong.