Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

29
static/js/ketcher2/node_modules/accessory/index.js generated vendored Normal file
View File

@ -0,0 +1,29 @@
'use strict'
var split = require('dot-parts')
var balanced = require('balanced-match')
var ap = require('ap')
var findCall = ap.partial(balanced, '(', ')')
module.exports = function createAccessor (source, path) {
return split(path).reduce(accumulate, source)
}
function accumulate (statement, property) {
var callString = ''
function append (body) {
callString += '(' + body + ')'
}
var call = findCall(property)
if (call) {
property = call.pre
append(call.body)
var post = call.post
}
while (post) {
call = findCall(post)
append(call.body)
post = call.post
}
return statement + "['" + property + "']" + callString
}