mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
refactor: use camelCase for JavaScript APIs
BREAKING CHANGE: Options and method names in JavaScript API are now renamed to cammelCase, for a complete list see #109
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { deprecate } from './util/deprecate'
|
||||
import * as _ from './util/underscore'
|
||||
|
||||
export interface LiquidOptions {
|
||||
@@ -77,13 +76,6 @@ export function normalize (options?: LiquidOptions): NormalizedOptions {
|
||||
if (options.hasOwnProperty('root')) {
|
||||
options.root = normalizeStringArray(options.root)
|
||||
}
|
||||
for (const key of Object.keys(options)) {
|
||||
if (key.indexOf('_') > -1) {
|
||||
const newKey = key.replace(/_([a-z])/g, (_, ch) => ch.toUpperCase())
|
||||
deprecate(`${key} is deprecated, use ${newKey} instead.`, 109)
|
||||
options[newKey] = options[key]
|
||||
}
|
||||
}
|
||||
return options as NormalizedOptions
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user