mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
perf: remove transient strings to reduce memory
This commit is contained in:
@@ -80,6 +80,7 @@ export class Context {
|
||||
private parseProp (str: string) {
|
||||
str = String(str)
|
||||
const seq: string[] = []
|
||||
const push = () => name.length && (seq.push(name), (name = ''))
|
||||
let name = ''
|
||||
let j
|
||||
let i = 0
|
||||
@@ -120,11 +121,6 @@ export class Context {
|
||||
throw new TypeError(`invalid path:"${str}"`)
|
||||
}
|
||||
return seq
|
||||
|
||||
function push () {
|
||||
if (name.length) seq.push(name)
|
||||
name = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user