• R/O
  • SSH

fcf: コミット

FCF - Full Stack Javascript Framework

OpenSource is a full stack development framework designed to simplify the development of WEB projects of various complexity levels.

It is based on unique technologies that open up new opportunities in development approaches with NODEJS.


コミットメタ情報

リビジョン83ede7dfed06e34ab4f82748f998a2b446c9bda0 (tree)
日時2021-06-11 16:00:17
作者v.o.markin
コミッターv.o.markin

ログメッセージ

simple optimization fcf.resolve() & fcf.resolveEx()

変更サマリ

差分

diff -r 6f6cea8a0d73 -r 83ede7dfed06 fcf.js
--- a/fcf.js Fri Jun 11 09:37:19 2021 +0300
+++ b/fcf.js Fri Jun 11 10:00:17 2021 +0300
@@ -1763,6 +1763,13 @@
17631763
17641764
17651765 fcf.resolveEx = (a_obj, a_path, a_createObj) => {
1766+ if (typeof a_path == "string" && a_path[0] != "[" && a_path in a_obj){
1767+ return {
1768+ object: a_obj,
1769+ key: a_path,
1770+ }
1771+ }
1772+
17661773 var pathArr = fcf.parseObjectAddress(a_path);
17671774 var result = {
17681775 key: undefined,
@@ -1803,6 +1810,10 @@
18031810 if (typeof a_obj !== "object")
18041811 return;
18051812
1813+ if (typeof a_path == "string" && a_path[0] != "[" && a_path in a_obj){
1814+ return a_obj[a_path];
1815+ }
1816+
18061817 if (Array.isArray(a_path)){
18071818 var cur = a_obj
18081819 for(var i = 0; i < a_path.length; ++i){
旧リポジトリブラウザで表示