{"_id":"faunadb-fql-lib","_rev":"54-9be7e554be53c094de837309a3014b03","name":"faunadb-fql-lib","dist-tags":{"next":"0.13.0-0","latest":"0.13.0"},"versions":{"0.1.0":{"name":"faunadb-fql-lib","version":"0.1.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.1.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"2dc4000578c8983ab5ca020a8aae1592c78309bf","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.1.0.tgz","fileCount":13,"integrity":"sha512-GCSmJUlo8VJwTPxat64mM++/D3xlfeP+tZLkFQ9uoqcqyzmgmk+PqPjmXnSU2RK4YcG+iQdaKiYLJwiU76YXkg==","signatures":[{"sig":"MEQCICLRhly720bSQ9CwzZio76u3Uwo+SCXXjEQMUzV7DOiVAiAk5P/UHw5UBMIl9zy+pQStTKA4dUF8sYxpuHR9d2+WdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOffTCRA9TVsSAnZWagAAY6sP/1pMG0CAXrVbX+X59c3w\n2rdsi1JBt/Lblp+MjMxFqkfmJaLzH3nMUh7e79kpSe33JB0V/w1bazppvzCR\neAie19wHh/GF3VA5f1t6YDhSnqvclLjoovmtYgzhJbhODzUbct9FTPsHdLT8\ndIQ9+gjdSPjLDLVGYzC9wZx33MpZ+1JhMlgOuzfYY9rmiv/19AA3Gx6jZLi8\nToYiO6l47/BoayyhtJ5paobBAiRz1KvsWr7AWY4KExScFC6z+Pnuzwsj1Z3L\ntbPcyV/jqsyCZPPvGjwPq4ehUdPWwIXzt80ykKido/eVYF/8zzoZbnZGzE7W\n4GTgN+H3HNVbqNdogqeccp/n8kxlscMDxXABJMf59fOBElcHA7DJoV3ku1/0\nE2MQBoX9AawttlGL1+e4IorHNSPsgF5oqr/CZmTaRyAfP/1jIFHUHVSRgKFO\nA1Xr8B0AXnbBlI08dd9Jsmioz9GvnhNUvBAq3CGuU8LkjwpIJ3E8PpspCz+3\nLVaO9x5CsrLLPIr4WReti6p/+KKBPl1QvRTdOTqvkURUrsSQLBHlh5/KzHYx\njkq8IYdDTuvBiLQRvGwQmRrE4H+DfFh2QP1r6Tge3eTnjRyQhMsccu+uK/C+\n1rY3qZWwgtlZI4jk+HCSLMIvIp6K1iUt9FKqd/x6tm46R8HE3ptJuivY+Ab/\n8SdX\r\n=gEgI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","module":"./dist/index.mjs","scripts":{"test":"jest","build":"rollup -c && tsc"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-typescript2":"^0.25.3"},"peerDependencies":{"faunadb":"^2.11.1"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.1.0_1580857299314_0.8777916985337879","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"faunadb-fql-lib","version":"0.1.1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.1.1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"f1e5c94ba6b507446392c3cb079fffac3d4aa5ac","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.1.1.tgz","fileCount":13,"integrity":"sha512-tyhNwsS0ODtwxO13VC7yOG1P1Fy4S+aHPkz9x5JIDTjoFzro9CcBNq8ydnRtw9fbJ0zChL8PdU5cXfhMTYw3Yw==","signatures":[{"sig":"MEUCIFx/fXcs6s9yPJLBHRvnxnymwREpjyFa8yalUcuzax/tAiEAsIBM3sOmoGtuzjgotLFWE5vZ/8vz5xyFJmpauqhztMo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOfmFCRA9TVsSAnZWagAA2v0QAJkd61PjjF4BP47W9gMu\ntJqjXgy7tKF2daYTmXhg/VcMmjNaazHRndqHB8U/4mhnWHecZ0xvIT1byKBy\nf7xzpuFgUqH5sqWwNuV9FfLVt8sxgGdkOGMlqg3svy/VJHumZmDJJbYD4jGj\nZ+5oaMsH14aIxDzRaxQGUOvpHSJqV1KlciIS0ecTA9qRyCmAR17PxZMBmRPb\n6VgY7XSpL8sTnHYfHlWNEOtezUY/OWDidGOYd1BmCiaWWLbthlQRLZqyaaqg\nOmJQO3PjeieYg7pO38x+AjwMBIBf+NB+budraHzIn+FLm/M0zRpFeoMFsMh2\nMpHnoNogOoqXeymzOMec/M0FP3CpMZ2IeHoxZ0BSos+suk64WcWkQK+R+zHY\nZDmmFiqJsmtjm1ruoHtUT9tuvJOtz9lxtDOLVxzcd8EQvL56EEbL4Ssa7vG9\nGrX7HOrn+clwMljtLbHV5VvG0jYauXX0ZJwMqxr8y3NIFCavKw14AmVM0wyq\nsp7Xtwps422VKDjm4473GicLc9tFm+FZp3Qd+F8V+BuBMMEEGnfiyt3LOMHL\n2m5rY/O0ra7qcdz79+VnZKA8EcHvSFLk7I/vdZgbse6gC5snywkaB1h9zzqW\nTr955nU9VJ3U+1cMLIvzum3dhv7JqmwUJhDRfHVqvt0ukOJMkPniQtUsZFt1\n334H\r\n=DWlo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","module":"./dist/index.mjs","scripts":{"test":"jest","build":"rollup -c && tsc"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-typescript2":"^0.25.3"},"peerDependencies":{"faunadb":"^2.11.1"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.1.1_1580857733059_0.3190903914578451","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.2":{"name":"faunadb-fql-lib","version":"0.1.2","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.1.2","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"9d7050cf64454aaab365bb5ab7c66c9e741e3642","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.1.2.tgz","fileCount":13,"integrity":"sha512-1izxkk0AIZIFNqCo1bEbieNJIAeuJlbWjF9elqYBMo/h202pna/xv4PpQZjcW05r3YiNHzHT2t9BYqfLNscC0g==","signatures":[{"sig":"MEYCIQDZkVYaI1rB5U+V7mydGry2CbC8l3kI0EbBPVpHEGhStgIhAMftX97gsmxd1tO0mb47HiRZw5kLlvPYhBYMXTz4JFCb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5176,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOfr8CRA9TVsSAnZWagAAeNcQAI7Vq4WgRHoEQQ6Pz20l\nxysX0QHq3yRc8Uco0xasZSY7j7djP6uuBAKle4hrCSEeOtvVC/nJUIldOrIf\nvT0xyVnjK+vKLKA2DZmUciIQgCaOKYAQFlevBUspmS5y6+oJ2AUJbjuSxL/U\nKLowV94/bR0j9iof9JXUoKP7ctgvYkHMjkFGzQea/5ktehYVjnFg+khgSvCA\nG5J2OkvhUX4xWkPL6/W2DBaP4YnM88bUHLZ7QR31YrR1j1loLNhWillXwosI\nCGY8zfNJyIfwXNbkGi8GxecVCDS0Bg7SMigsvDcSPsOoF5sxKmzZ7zLRtMbx\nx8J8znVnI78vHn/15VZQkkHyRXdqQsqmebvXze/12+CeBPmbhgcvqiykVr+L\npJy2/51NUXXJF/ySqkZHIOKT5g2bBdqWJ3CT1wmD3CYjeva3UA4tbwuGiBDg\npPi1EYHLytG3fVAs4eTCpHZgT+y6yuUPTdDmfKpB5akM4yrNOH1brbkWKsFW\nFDNiUd8kP0JBPR/BZcimw7BO3l76ZtkBhCkZ0+Ay3TYyPZX5ArL9Wshnydzk\nmIuFAEG6tfsI1ogHsnMq+DLRaEf7fCvWwR0zIg5S34/nj06QyxUkHYPbaUBq\nnAcAVw6FGBDkBLNapJeacmdsLelCLqDYUBq7x8cpZx+FVfGJqbCTPRK6Ds9P\ncMdU\r\n=2JiQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","module":"./dist/index.mjs","scripts":{"test":"jest","build":"rollup -c && tsc"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-typescript2":"^0.25.3"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.1.2_1580858108532_0.5238110845496928","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.3":{"name":"faunadb-fql-lib","version":"0.1.3","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.1.3","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"bb777147343a9b72daa50a16b113185722593a56","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.1.3.tgz","fileCount":20,"integrity":"sha512-1vStb0E97XfNMH18BOf/5qHIVcnW3hfJDg/NFUDeCmZl3LWdPMS0qyQXqWTEK7p9mL1L5ZxA5AQckqdxXsotGA==","signatures":[{"sig":"MEUCIQD5YgYUeoqdDtHEFnTI2U22j5yupSfDd4KKZWg+LJobzwIgJ0aA1Nh3u2gAwHjhxOi6dNEWLB2vWpvG0Tqi0vlpKqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOf1qCRA9TVsSAnZWagAAU+QP/jhhIDTZdfgJmcQuDiy8\nX2M7XKHVmGcGLAJIVArM0/2qwi+3LKVbxlaUC9Mu2Pxic+TQaYQ8eBUZJDuP\nd1fTh/tXQ/tzm6Fm1bYjjmWRdMBx7mQz47P0e/CCEZy47kdtWfboa6aRbFl5\n2kWHo5ztGoPmIBADnocezrH7RDAk0RmTv+J5p/Q2MHm8J431T6hnOIcG8XrX\nWt6PIoN5jhFEyqQde+TjSmAvyVTAKtklNyFP2hGZkNxhFE+W5eLKGKD9kvbf\nkCFA6Ea3638VSfwO2zx7BvuAytS20T3T2Anj+3pZcHdHPYiSu8ktVTs/TRia\nxhw2D8HoUC7WFHdDtIhjGgcuB45Ij+NeJxcelfVIlDd1qWXEoTbbRhkY/M7J\naiQ9Md3zI3jiqlXE95Wkc3YqrIK311WEyer4ZfRoPTOjg/6va8humhC8pZfp\n2vFZKj9T9adB3XwomF4GOU1rNtk6f/b/vgXN22XsmarkTeA1dRwBvmOeW75v\nIXRGve6aQId2XASJ6QG7VS2ynHLguMDxZz2nSxzpOZHRLlkUxCz4fmtOCWtK\nfILr1j4rIaiDgMBhSpgqLSVSPcRO0V1ARmUMZK/CFVGHi+eUzolxdXH3WwhF\nAppF8qbSCmxhkLHVE/z4NQfb5C8Zd+VpLUTG8guoBt8e4alQXT6Cj2K2KRr1\nShhq\r\n=9K9d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","module":"./dist/index.mjs","scripts":{"test":"jest","build":"rollup -c && tsc","publish":"np --contents=dist"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-typescript2":"^0.25.3"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.1.3_1580858730239_0.3585463292091444","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.4":{"name":"faunadb-fql-lib","version":"0.1.4","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.1.4","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"33fd64c1a159da1835fb93b562dcf8b3a80a6893","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.1.4.tgz","fileCount":11,"integrity":"sha512-yPFr3KJ/8SqwIirfePuhdho2jUMGfYpkWfxBS9hh8E51t83WF8moNXb4ZFgL374lo5nkjNXJ5ZN9naSCVC4wlw==","signatures":[{"sig":"MEYCIQCskoKW64P486HaeUvWoZdk61t0ynAu5eGcVsIMF2qHcwIhAJ58Yi586IzHQHi8LV3UhG35CocLVn0jV6BL2wAjJavO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOf/KCRA9TVsSAnZWagAAcvcP/izDCrkv6qtKl8mwPO42\nKWvXu/gDp9DTLerVRem5Y1KCeyCwcWuupnG9cpEnI+cIHd4HJZsBpNIp0+pQ\nJWzXiCOKCEylCBx/4PJmHBVuESg8l8rND5sshucxjoGoNXI2LtcmJXrFWWhT\nW5V3vrkdE56qe1L9q1RY3rGLUTscJ7P1QlLNMf0luNUnIxAcDWtWXRMlxpbD\nl3V2cs7w3gV6CIiIXxSm/cPocoY7vCIVC7QoA1EDTcjZ/DjSR/h5RJAdNCqp\nDshyNwZPTZ51PUFSYK5kvJ+4dZE2pZvwxtFmovNzbOgm61PjhWalKMogxIiF\nKzHpY/MnFr7ovOlN14m4oI1W6gIjxNk5EgvJ3J+CpypLJhdylRXmLfXluNyd\nZCtjD3YpstiP/j+5qRPUTY/x163sa1LXYCZ7FMv7+hD0a90JtvlRfs/gMDeR\n/qT32T68R3v2iFPyNPj+vCXIP1S+s0xBVAXezl6+aUTyWSHtPe78gXFzZ0mS\nTxoiCaQ2jxeppOiPMpJAoDrYsvRSG1EEnfNj7yvFyAFq8Zq2X4ysFzx+lzCM\nSalUObc5b8eh7X55/P1WwpBMa8z8+zFsN2hrpln4KX/7t5BwpDZbIVxNbZak\nTdN+xoSSXbwULoVg5TsGRzZQhvZx6Ih11suhP8fbwK0Xb7ybYoHbkjckutMB\nk08J\r\n=Eo7w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.bundle.js","scripts":{"test":"jest","build":"rollup -c && tsc","publish":"np --contents=dist"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-typescript2":"^0.25.3"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.1.4_1580859337664_0.025002099963604252","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.5":{"name":"faunadb-fql-lib","version":"0.1.5","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.1.5","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"24a5d4d10a1dee815e9670e0a03313a1676d27b5","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.1.5.tgz","fileCount":11,"integrity":"sha512-H3OT/I1odGHpr6ToBL5eS9aeqv/KQi5rozNgDSYGIEip6bNCbXbhb61HLNil1+l5knj9nlU087znC5TS2n/G1w==","signatures":[{"sig":"MEYCIQDfPyux0DJaIfa79s0tbtS4vtXkMCdZKbzeECFfICgxUgIhAIAk4ICcbxK6HOotuRv5yl/EbLZtbavJZj+2id9phP1P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOgO/CRA9TVsSAnZWagAAj9oP/2ijaNyS3qgph7RyXud4\ntgB0V6Gnm78CGvbHXHS0VZWnoNZyYGpGUtZ1CH5a5t/aRG8UByGwbeqNAoFf\n/7hKA7+jjv2u4GeB/BTCJKmbJC4P4sAAJTpfErXc1GVrVyvyulNa/pEkmHMp\nygUjPys9wdq1zF42DNSGTy+5kXmGkYA1KYWaXmR6AV3tdCTSgR0PTulWOq9o\n5kJ8Tb4PNaluPS5CJNAnDNkqQ24hDoUWN0Xot6y3JVzqetmta90RO4lYYFa7\noC/HwdqchSF39NwTlHgj8+gIfx3Sw3B69YmhKC+xCCi5PlI23Vpi3kMI5sua\nuhzgMpSZ76bmDdmQ345khKBMZJjRJbt2wInunaiHk9uP48+omkWW65M9SUXt\nVDS6NJWAJVCSLOMaYJU5PvE4dHK2XYK3qzvF4eUEhH83tGtEgoSZyWDed9Gk\n6+AA0RMu8I2ffmaqWY77pLD8xINdWmjIcTZFItvbVX7sXiTReNkqyg7ESZZH\ncPEp4up0ywdO0Txv8yzfwNMlQqicwZbR+XIUPyqDPGKLXiaAJy30nHOW4QJP\nWKl0PKoIb+9yZ4i0K8rAV3/I8gbw8KUiwVRqt7Kn9lOBDFf4EP6An4b4+ThV\nzK0s9nthj/S43PaEW7VD692rfofEMmf70QvfCEiW2/b1LvldfUsAk1uaacoB\nG55c\r\n=zsQi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","publish":"np --contents=dist"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.1.5_1580860351000_0.7202448278039879","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.6":{"name":"faunadb-fql-lib","version":"0.1.6","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.1.6","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"ec24644cf5cec4b705d9d22a3aef02ef3f024cca","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.1.6.tgz","fileCount":15,"integrity":"sha512-VTjX20MZOCYKsfhQnp8DIKWL1O9ySsN5g1S6tGKHdvpU+XisDUzC1Ow27QniD/f8qFTUXPZA8OxngDXwarWlvA==","signatures":[{"sig":"MEQCIEhVzuabZ0RW4VSHCTWqGQk1/Ia4TGTx1wKfAVwV249AAiA7Piqa29TGCtNUIV5AQx/7WC0mjLa7HNrclK1nr//dNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOggcCRA9TVsSAnZWagAAAA4P/ju301vB4EZHQ1VH7U5b\nXyAljXmvJWEIL/KYPoNUDCqoGQimJJJfNUQHPBULqi7MtHD71H9PkrOf0yWa\nd7MO61lzbKNwj1BdrzENPrr6AEaQ7OFnfImqkt+r4iYYBiWIGNDAPNjOYTKM\nRpBt0A30xm7S+56r0osilGiYkaWs2Hj3GOvKbXu0aIRyVkIKJ2B73/jFovmf\nNUa9wWWRflF4Z2DXepFRG0yqTaWpj2/ksP36EK2L52LqUd0kVCCXD12/WA1t\nZhIKEYL5hyx180W+Zt6x1aXWJDmzDG7MCdBuiuCqVp5HmtGpGHYmTmf5Oguc\nOt0RqmSiVuSaw1P0fLI4TZEUO2Zii+82J2FmXONQCvOzzH8d9qIERy2cZudP\nKMztfQ+vk5r8HR5ppL7c3YXqxtAmOmlA2erOAZVlXkMxsfIfKqt9tjnRq+oC\ngOn1YWD4fZCH2hYBTGZWig7H4dasUlJRKwQEK9FjTkBVBd+7bxbkhqpaHYCW\n385J+kchEldYBQNxdG6MLU2ABRPKI+HFsYiYrwqmHDEXYjEYAHXXHAEOH/h4\n2ZvL4qdl3CbHeU0R7tmNqJqQ/G/jVsbwMp3O/YUTuKoPkRWsRa50TY+0DC+w\n0VYALUvsBsnyhbzNy8DxIDMMip8Kfz9wXlSp8wR/pyBfx081AZJ5Aynt0zRJ\npJUy\r\n=dYcO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","publish":"np --contents=dist"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.1.6_1580861467664_0.8889803723323042","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.0":{"name":"faunadb-fql-lib","version":"0.2.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.2.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"d05cd6c60d0913c5f7fd23455cadcb9da1822d41","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.2.0.tgz","fileCount":15,"integrity":"sha512-/aLmlWM1ho+WmP4wR9IawvPJDWouX2lXmRV5Aud2y8F2vG9sUSvFlRyYKlK736/LAoL+OmBwz0QEoY4tf/HoZQ==","signatures":[{"sig":"MEYCIQD5uT8/nItkwmJu+Y4gIhY9sPBFCjxnlw6JQ8MRLgQb9QIhANU4nA5iDRVSFOduuAKXOHn+LZ20M5SAB/CsRrmF+hWl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOg00CRA9TVsSAnZWagAAG88P/1uxTXVSg5ybMmC+lQF1\n6jrJFkSKhmgOEI+4OFCJZYLzCrl47LmbUvkMMzQtih/vPvUebpoQ12KxIdT3\noGpGHHTM7bBdIhEvw+Grldf4CEn9WZKGzLHe0wjaHZillKvEEcKecGQExmu1\nJ5EMiOxn8O/qmPVFJF6K/7wtie4VITsRdRNKwZtyt3la55AXsN6McrtJaedo\nJXFDv1OyYcUMFEixl/0p2ZMfvAP+Vn4cz4iy16h5i5cVNjtiApU9ei8povBT\nWN6Gi/W67VLQ4DeFMa7NUdcXP6sYDdo0c5qlaKvsNpM+WzPu5Om+OJBCEtoR\nq5YcAs064hPHS7aEA9Alkq9iVN8wb6cjGXRdflg43yOSUbcFZvs+WkyP/vA1\nOnkaiHJ1hjqpWk8esGcN0Wd9JkM0qkvH/9zHVaLXRxEbGeJgYWHJ5sdEEFn/\na017G0c2XREt72BZEh8afkwkd+QoS8ku4LzXvts33u9pydcCkDauiWeq+JqS\ndwVNGqxcwPnV5MC6WQQvWUaBq3uCrcFtonNV6V8UKFvTzsrUUX4d3vKZbQLT\nOuNs3xGTxh+2U5gvK7UMLIIislwdBIeROaJs8U50kT65rBxCtpp+rqEsPDvt\nNQi9E79okLTFr6Rb7TryF9J51UDkwSXlqzW7e8VvptAvj6+hi8mfb4y+SSq5\nbTVV\r\n=oOja\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","publish":"np --contents=dist"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-terser":"^5.2.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.2.0_1580862772221_0.1439944105323414","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.3.0":{"name":"faunadb-fql-lib","version":"0.3.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.3.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"e1624bb8a314513386e791190eae95f28cdea9ad","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.3.0.tgz","fileCount":16,"integrity":"sha512-H+yKKEUrrOSG7c5bNDUYMwKsRlZtUi63WwDPQeBRdcyvgEJdwyREU+15YYJAikQA3+DyDb/9eqiV1n/hIQg84A==","signatures":[{"sig":"MEUCIQDDKGtPlxVpshaVIKaVdMVnMRNv/ULQ3tnj2NYJyyoSKQIgWww1ebwv/pEyxIIrVWx19FCIF2pJQmdk3ir+VYbk1jw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOn4dCRA9TVsSAnZWagAA3KwP/jrlpGs4Hx0j4bX5q/co\n0S2hP7XXhIiubQZBA6+fQ2WSUw3kcLnRVEG2v2Y7IxKb8BX/u5ZvWdFuqMU4\nSg6QvvVJkNTHbJGFBPLjG2QvzJSWxO8YxWk2hRZIskhHReeLgK5TbNxNynjp\nZbp6ko8g7KulHntpc1Y3MKtlJ+Kvtfo98XE3weME+8CAqFXI6LW0bF75pKS3\nHBMCttfcJGi3uiK18AnPWGKSsc6lMWWrCIa24JEZGpBIiJpvQl3neZ415eeV\nGTeS2tYyDvT3nmCdtWahFDX84Vcw/jqZID01ZaCqtc7bqCqW1SPQC1cdr5uQ\nk/Nt5i2mFK2YeYtBPNT7AvOU8TFWUX5t8M+Pg21efatMdJl36c5zieKBN+vH\n7PNHp1U1tx9shcwoBmjGQ6fXi9OyNwGSwdSOl0ItFWtSc6ZRW01wkafnLl8L\nEo2NF0mQlOPlSv3KmluszmViItmfCnpEQ2rIX6cqAWGrR0Yzt+eRG+VRJuk2\nWarJ5BvyBQBDnYNt1pw01hfc/DuF6WG7ROuYw7mXNHRsp+YgMWu3jb8EfRpI\nhN7e926V6OS4uFrUoxv4DCqadyX6Mso8OOhqusnEMyH/JsA5igShmQGnQR7R\nzPpFB+tKWxSrMG5O9U+fyBvr8ZF3pjgOG12OD0snU2K8+XwzcJGjzH2IzDPI\nF5hi\r\n=RQbI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.3.0_1580891677308_0.4376741744586812","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.4.0":{"name":"faunadb-fql-lib","version":"0.4.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.4.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"b46d359dc5c1f25ec7f24262306bd085408b3f52","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.4.0.tgz","fileCount":23,"integrity":"sha512-MRsBALpcFvaseke2CdRtxBHVHpT1CRBf2LUo0ohzMN2jc8131QjKKFNxg7RnnZKr0Rlx2SJRbQ8edoqksPbixg==","signatures":[{"sig":"MEUCIQCXYqIkj2o+bkY7cp2fIO+Esm0D8vuh03V2Iq1I6IZ9sgIgPVXlNwSYppJYKH5PokIl6L6JGQe3a68/VbBCadiSa7w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOoYSCRA9TVsSAnZWagAAMMkP/0bAIVx8UCLM7HAz8a9V\nFDxNa3YltrHquaZUFnDqpT+SwOg7GTJnOCbrBMYpC/uUHk2PuvPf4bRItS2l\niamm/bUNjKm8vchbaW5tgJBWf+6Ix5DYlohG/J0CMW0j3s7UkK/KTmQRZDoz\nien0/Z3oFq64DgtVTtzlMpNd5zIpjbGqBqPJnYqzrMgyOpY879dVaj4uyWwF\nIJsQu7PGfOzpMvezH/X/OohT984aG530RO9CwgsLXJG6lqkqOaQhnUkghEA5\nwKG0LF0cELORCTpriZJ1EEAQ+dD3XBa+85h5IG5+1WNLHM94+L02ERBwNCb1\na/GBqE83wEB9OWuk2QFjkJT57Nf3unKeO0TuEatWwZZNSIMrVwxpMXaC/u9Z\nOuQ8cVbPubkK+cMFTnYWlKToNnHniEsEuzRtEWUgkkPHnkI/vUZIncnFSRIV\nUuczJhizq3yXNvRDxhTyyMT/hp8kgbP6LgFkZpdd25uUzLX7VS4xrz5Wwu/3\nIhA8f0HLDIHbf1AmQj+ngL1szsdQjrG1z9OmRLUwB1Mp+VHmeR9Il6jDs7Jn\nYqX30QspXjdwA4xjGGOi08/XTsePyzpuDwTuLyY+brcO3QwoeLw5TjAiVK/k\nBCh750WXEhZPC5QEh/SKuDn4wrUsiVNqokRYBDsF6U7ZEFu9UHrP5W48T6cw\n7EM9\r\n=jIPs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.4.0_1580893714004_0.04732923625732455","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.4.1":{"name":"faunadb-fql-lib","version":"0.4.1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.4.1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"5742b49ec97e2574e5cc8db95f31d77fa2c15442","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.4.1.tgz","fileCount":23,"integrity":"sha512-cuPSN+yu6MguXwaNwfKa7gxlcuh/jNuGmtt3E7ajHW9aP5EV31AXNwjXarp+XV69eg9hUOiQxV5Agv6iJRiq8A==","signatures":[{"sig":"MEUCIC/UkGMPdWe8Sq/iVa4OU2uCxP03e3VGgNW8xk5vfgeJAiEAx5ZJv1ehqgHVtdhawf6b8P2E1QG3G1OhmvLdIL8seek=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14420,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOo35CRA9TVsSAnZWagAAYE8P/RXhOsIzudraRRWhWSQx\noRbfqoFwHplcoQ/LNYYtAceDIwWORP9JzQojuT+wmqlb/UmzgpIBA1fU4vBJ\nneUSieqMrzz8WToxZY6I6mEmB1CFYmdMSr2Ay/DZpAro4GlTJ+4HjuLO8W7+\nSHcNPcPcAP73voJX55o+mPzyHKW3L7wBW8RtYc7WMDsrX1MdxPx9qxWjzzR9\n7abXJ75efkcROD1+tjD9RqtWgU6MyCzcEVRXWKMX6Sd0B+c/Exo+U0bVfCME\nqPcKb8/ZOCT+owH3Z1UsrJ6UXnEHsRrB9xsqlBShWdsrLsW0K0QoyU+0bCo8\ns+kGWM+w4yqC1iUrcVgxHUmU41N/dp8nlweY+oqaTBvVbwchBnC/plDwqoFW\n5yh2p5KHNsWCGADxOUrI8L6aKA30ERznmDdA9WwgC7Sgi2fnbpgVB72i2yhl\ntqDgm1w5HQyM9yCvODR01AUVKKczq5+GBiNUxATRsaCj0HFtNfsrw6aaGHkl\n+JE2csZ2UkRe1wFG77QHSwYTNlrzwQK49lpgOblBnn1bYeDi/crSLWmm3kK2\nQxoEurKM4IFWPwbC5Q0zu2gQ9EB1/3UAFkjXBmsMqZ0lbWX4kqKJq12JkT+/\nlKfHApFnpFcyguC11tMr3NZtMlPYsGro+l2GTkp6F+vRYLjII1niD6qDxQS+\nEJ/X\r\n=OKDM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.4.1_1580895737257_0.5508990579524449","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.4.2":{"name":"faunadb-fql-lib","version":"0.4.2","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.4.2","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"4b1be41fd177b7240c0cb86ff2a12f084ff456e3","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.4.2.tgz","fileCount":23,"integrity":"sha512-J+kPOruacw/Qu74unhC+Y2ZeEwgGAD0E+0FgPsp8E2+oWssobP7hRBoKkeRsLFAwDzBGQTHlfGl3PEteHzGA3A==","signatures":[{"sig":"MEUCIQDYwG/gbQMqYsQnVCIOAIuvirqAxWtoE7ib0wslJtcQkQIgCqo9FhspUd8ipr2Qn3nmRHBzSroP2tkE6dFaIvJYMWw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOpMVCRA9TVsSAnZWagAAxs0P/jmijvWqUbhLW2GgkLfJ\nMkp33M2hqYGzqQQ0oULR4ZrwNGWgRnzAlnk58dNqVoQ2SM9zst11+FWtSDNG\nAT7Go3EKHRHN++GkecP0NbDhxVjxkqnV4foqnn93Zaod4ACV8gxvl23S9V8L\ni/inDNLuhDBaDnKfjJUxTU3wdnfrUdHn3QUdmL9rCTQrVDtNNKi8OiW3elpy\nUpLrsVaioJxMVP1Hh23XL89udgZETbwWVRMVEQ5kmNrl6yEz5Qc60xrBzFJb\nx7EgX1NapzkOrmEIIFNqrJ8vEeegn79yte6eRNVOn6/Fs3F/vLowBKjpibvw\nkrYJthfjE49LWqRZi+ieQbFoOFCkpPhDRdYePaKDCqsj7Wo2yQpgonQhKxFr\n4fXS6a4twgA5lFPhUSOJdC8yZgBaZbpY70x+h6nwGib9zEZSnyrU5u+ndM68\nVM4zcXKyCE9KBSOhM0a+OTtAacyG3MIS6Vll/rj6rHZIXCUjy8/dGfM2XgKR\nl7ZwY+Knrx++GUNiM85sOyGBJtMOYZpRkYt/ofh8NkbWro8UmtPn9iEarguY\nhG9sxhE4n/djDtNRqIi0z/RL4sZaZ8KdyV80wIg8daczuhjJMF0piR0Fj/7u\nYe8HZ2wYjYOFaeKFVde4TJkiBJbyvGkZOhHd0opuk3XtDfceUt0Nf8TnSEhs\n7Nn7\r\n=k5QO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.4.2_1580897045504_0.900237670939279","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.5.0":{"name":"faunadb-fql-lib","version":"0.5.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.5.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"d9769fd4668a754ea9efd461add2bf4be5024dda","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.5.0.tgz","fileCount":23,"integrity":"sha512-SeOVkOYR/nCrI4K1G8aDvqIRNl6Imam1eO6G6KMykmSU4BH1UAIpF7+s6v/K1VguPwauqYT0tMkrxw4AQSPSdQ==","signatures":[{"sig":"MEUCID2ilSE52YbpwZzfM95w/i1aLUd2FC8g+IWTZes/FuEfAiEAqvoJZBOmWbQ3ARmu+zDns342U+xqN/4Q7SiiSZp6gj4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOpiKCRA9TVsSAnZWagAAo4MQAI42ePfoBCvTDAumWwh1\n6D2ynCaziHLke4OgdbLbOSXjNjlcUIFgp2zYFnht0jc2GiZMntiemTAxYr5K\nFlOtS+M0rFBtlHqJTq7+z5OwbnfoN1kE5H3r6MF6Z5RTycwIEv3u5PfXnXxy\n93HQQEUyv8D+T2Q0PeRzoE3PuD7QokQZkvYvZpsArYxhLN9pG+KgoXatE3Ag\nSfnmBougzvCYh9MwjbEe4Q4/9052Pi+xdZLCyzn22mwGEDTMihPmuQ+fG+mT\n+gwnRvHGe56UpZ7HOvDG3ynDKD+J/+c2gnTDE1+JU7/q8fTbaLkh0QmySYqd\nRIZBbqP+05doiy3JbJXbXR8Oe72FnrVyveyNCs9yS3CdV+j3TXEQDRwCSg+A\nI+dTfY7RipGlore8smC02gGKQzrffcm8h7COd4t00H2SvBC3BDxF1giC7PNS\n6qVKKuVD33N13OZiIw5s2FZQenY8Qh10N/wXnJSDqWR6bHxpIlnVLc7ee0yW\nS4IOWJK09iufjrgUVcgS6qGLMkoScgZUfKNi85c0FZWiAsS0APHN5Pq4sAwc\ng38U0NlZAWY2gnGJAlai1atihMyGfDNnothJ4Adww25HM4owFNWzYceprwAT\nXL+JZyu8xioR21BQ8vEJW8J8Lbl/Tw2Za5cGk4NI0QwEikPmMleOrhBQCo7T\nTTsW\r\n=dzZ8\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.5.0_1580898442410_0.7494552083995516","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.6.0":{"name":"faunadb-fql-lib","version":"0.6.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.6.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"72d4965b4209f6d8e52cd4e773b5c36154fe4965","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.6.0.tgz","fileCount":23,"integrity":"sha512-iqa8HbMnVSBj4JOy6Zi+DWYn2cRce2/TkeEB9k/pFB4H/yYC8eRwnS863S3nHHaSiPKy8uHZFEBURYVY1sunJA==","signatures":[{"sig":"MEUCIQCO00XmezesqAU5pboWSOTNXH9zjGnpUvax7Lmt0ZPArgIgVxsx/wg1AnanCC8CUKG1VXGSqp9b9O/jaxDAP8EHq74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOqdFCRA9TVsSAnZWagAAJCcP/3ZcB0qdPplZRkhQ4Wqg\n2tFCubB1QyRlYG7wO70DDiLgifLQKKl3vbEPjKVCglzs6icn9MdbPp3s1s5C\nFi6HKo+WWaC85cgVvcgpUUX0185EM/Tj4RXSl7E0I4n6s45Z67zhq7sjpCIh\nKjB59l5SmBCjIbzza0brDeC3sPx7jdXaMKmUhTVxSsYf1wBED9ONtSq3HhZ0\nxtZq5y0AX8VqJx0WzaWtkNjpKeqRmDEYOzg4v4r6JV0CkSf2UdmuEk++oswc\npF0B5OpcKvA11e4lQ2rhhwDhwO52hNwv0aRGxnHLf6nqjSfyhTTU2Uvn3/ED\no1nFtdA7QiJt5DvVgMMiSCZp4v89zvqJR4DmvY5AqhBg3+NSc7MEIlYJ6ETi\noPcZL0qTTtQHNycOkrQWEPbSBd+z3Mdx9jKuRz2b+uQkxFaO6sqVx4FcxHL8\nWO5lr3T3qYXLKsDaf6a5hQRh8srQmbbyMDu6H9EtIy4LTD1QT3ScMRqjf3aq\nrR8Ao3dc2ooOWXjijgHzt8jHbRhkcrDgsJplx1c9z06W1CeW2DQKsKJzbQ5f\nmumQDf7Vzx3QwaQAwbKlvFi5jHp+T9TtfT1cta9JumTwErdZS+iyHX5QQLbe\nlAjT7LepJLkhOJiFbNBw7yitdCfQF2yycS2AV9DuDRKO66Ew4LKrm+mPYbJS\nezJr\r\n=tSD7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.6.0_1580902212716_0.2560311046112145","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.6.1":{"name":"faunadb-fql-lib","version":"0.6.1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.6.1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"88a8d248ff7381559a56ed9e9ad13dce2b98b890","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.6.1.tgz","fileCount":27,"integrity":"sha512-FFwUY59Q9MEFD19O03FSeebbhnlERMW6GjxkKFaHUCP2IlwpTmjP6y43gJkYUjr7omcNqylOkdqWWOTLBqeAcg==","signatures":[{"sig":"MEUCIQC2FAdOzV7tER/B+MiP76uiOuwQYeByDuvEe9vFbW68HwIgKMM2EDCaWOdHOU/83LVVHOcISxjEZ9E8E9AsiJCfv8o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35614,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOqiOCRA9TVsSAnZWagAAek4P/1YROeiEkxNtObEnlTkT\nUO10DGSawTAayTQHFzSdXZ83qoHCQUbgko1/nT9EJLM7JKO6LlAIRN2Ej9rz\nZGUCVMhfmVQqtMD+4TOsCeOOXlcphjl2j3lQuq0oq+vxWZzCF4vIfYS7VFl7\nhvlFl5p19RzZoWM7Jsdk8CylHaZPuK+V8quyjZutliwp3mMliGeEky+ERM3h\nY6YfA61+gEobvJ3NMwhkylGYWdfr/oSEXpYu8tcJwuyxYfH5cNswmuSII46u\nBy+SQy6zPbFS+Ye+Stq+ucS3Kt6ykGSRJ68cON9DpxBDf79gaWogDN+THN2S\nAMZOYkxThY/SI4/m1Axa7SKMJb/ZZUGpdmQik4lDdc7Na/ZpxDBkRy8A1yUX\nCfq4gapOU8yeCNwp+IA08vprow59L+PXWcEh09lOap9zLc2L3G4dWQqY+2pN\nZJmawoYNdyilW4gr4B/UA/EUGWOpldVrFTwK+gKfp+1RROreZ9PZ3aCJHfEh\nDzTVdpTwG2m+tmISX6GdoBpDyH+ybjeGbpML5zOVvwrWQHM/UBnadjDDrvX3\nKVPRlVj3JLV26MpJqFRxOZaN8KtXQqVq2p0KyC8xJFjnXLP5YoHbjq0q+/NX\nMp9BjK42dxpy5ilUOtrjtc7bwaBiDwb6t/AmrYW5xPyhTaq0cCD2ZY4Xmu3e\nv3Ix\r\n=VWvw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.6.1_1580902542266_0.8321306543434546","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.7.0":{"name":"faunadb-fql-lib","version":"0.7.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.7.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"d4dc1ed0107a80e192ba189d37b3c0bd9d9aa071","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.7.0.tgz","fileCount":27,"integrity":"sha512-vWggce34oleG99q0Z5reupG7gT/mL9fJqTLsMXJ1xmaXuWObaNHXvYHBaktHlWkHJEJvprkO17JgB0a4c0SAIQ==","signatures":[{"sig":"MEUCIQD+1vP16c62DboLsvVZpteJ+VqkkxQ2LqVtvnzbhJ9OzQIgOETLzvfC9mgp7nO1AcOiGsIu+jjsZ1HsBIJiV9wavUc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOsF8CRA9TVsSAnZWagAAodAQAI+moIZzA8JE7HUtGZSB\nYa9+69C4UFcu3D1DTZnn0A56j0CMS/qWYfQqpe2NR/V8gTlgzzVj2jltLflK\nwalgLwpo7gbd7mYfs6qHq+zfRpVNsWL7CYS8l/aTYpxNLgvuadYiuQyPP5yw\nVObf/H89FeyJbGL4BXq6Y8uYX4oyBag41gXwiWf/vSbPjPFP0ocO4l6srJkb\nRE6WALEIcQ06nj135nKrnGv7EFxV4ra8bBJa7E+AUE8xEv5YPCrAKry7yU2z\nKAS95CPdpZJqdyGAnH0JKLqwv6yZvSmZUvIHKtSTOzmkVlL1duBzndYuVNMQ\nBJmyjIOMl5t5t61CFbTda8z35A2e4tFHTE/xvQf0EhSaFSqj0qpWgYkl9rHn\nN6n22z5Qk2c2hdPVm7gcfX0XVgYOW6EsKxrxbJ84TARZh6Iep9Rr+Ne7+C1B\nuON8ZDGQp9FejM+EjqSZyl9HuiTW540K7+WyxJIFeDnNXJAlv7cJiNOZi6aG\nxugZtL8xwPg1/Q9YPCw+O/GGkjenzgCWJvJ9MKvdKzg6ArVouA7pM7Qexke4\nokQ8Zrw4Uic4DSKP0mnp7SrEf1O9A5Wo10DRadV/4b/Mt7ryc9bF8yKQI6AU\nBCGuL1Yqz3irKmgjUe4HLzeAlwqAh1telIEg0uyygHphRqyo7IaNRi/tOVbQ\nXsKj\r\n=ioU0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.7.0_1580908924226_0.5855216725285244","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.8.0-0":{"name":"faunadb-fql-lib","version":"0.8.0-0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.8.0-0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"b5652739dc55d5bf844de60fc7346eee57ff0e45","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.8.0-0.tgz","fileCount":31,"integrity":"sha512-ExV3t1D9mpwMNaIadZzTa8ncLBdQle+fBa4fO/4HnsyXczOSXIvTcKJbjMoSmXsiQEy4K8/Zl+qASyCoS8PtOg==","signatures":[{"sig":"MEQCIB3Ppq080lMxae7YlM4OLve1BYf3ta49gHIIh6qAvqWMAiAKP35PVwSMmrkHFyNTIxwssF/vvw9Ly8iphaJr7/7P+Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOtCJCRA9TVsSAnZWagAAN04P/1jcsSNMvUohuLB2iiNZ\nb180cXqQPO1Y9SRpj+woZodhSbsrCD+z4VhBP0CPcnnx3X0iV74kDVAJCTXc\nKr14bi4Lxu5Ul1PgJPVnXXA7I4OYQp3+DKvQvEQb+NvRK7qKOzXN46XuVStI\nv7VeLbdWT9irzRnrRX0aoaiBzBzSvQNyhVhEMPaRIGZirnUlxsxknkP8IsMb\nvn/sTEDxbz3IJGlgFqCtOOLC2hMYYXyoSA5aWlgYGSOGJhAwIJPPekEMem6h\n4+PJFNw9pCrmiobKQPkE+AGPACIhPwaSb8rdpaI0hKTaSxyg1htr1SGHssPJ\nw9RjxF6lMM8VSXZBjZiTYE8yp14D8ZKa8+e30yJ4NStHXIQ06QQfisaiycId\nen1TCk37sHFzAXAjEx5oYuNV/UgcxnrEXOMs3iKmHKqGyOvdJwdTbLW4KOdQ\n52y4ml4awrPnZldefIUfBIN3YfAj2LxtCg2h7UmmN2o0qlboyxFmgIKgFs/Q\nrjGtdEFjuCwkIV7D7EjJWUppb++Gu0Md1GTZTQ6+vWOl/e5pvKKgTyCHXfln\nH+YeSQzKbUZ8pODeTGfRdZrbvLeHfn0ZLJ34Ys8xUaymVBQyie4tnqqquAWW\n1etxi24m89483qwuS1O66DmIaUbEzjYMs8tV6hPct0AOfg6Pi76XpcrJ2R5F\nGXox\r\n=WJ2+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install aunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapExtended } from \"faunadb-fql-lib\"\n```\n\n## Functions\n\n* [`MapExtended`](#MapExtended)\n* [`ObjectKeys`](#ObjectKeys)\n* [`ArrayReverse`](#ArrayReverse)\n* [`PaginateReverse`](#PaginateReverse)\n\n### `MapExtended`\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way to construct a Page object\nin FQL so passing `{ data: []}` to Map will not work.\n\n```js\nimport { MapExtended } from \"faunadb-fql-lib\"\n\nMapExtended({ data: [\"foo\", \"bar\"]}, Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### `ObjectKeys`\n\nReturn the keys as array from an object\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n\n### `ArrayReverse`\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### `PaginateReverse`\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapExtended` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapExtended(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.8.0-0_1580912777141_0.3913863252436123","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.8.0-1":{"name":"faunadb-fql-lib","version":"0.8.0-1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.8.0-1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"0ebe8373f1d04f3832205628ceadb22935cb49c7","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.8.0-1.tgz","fileCount":31,"integrity":"sha512-enAEkrQl0IZeWR2sY6WV1EFz9UKGpKtNRzSQlA3eWPCUroG6eMf38rqvRhgWu4GE0wDNn+9mFqJJZrQ89D8ngw==","signatures":[{"sig":"MEQCIE4TUaDcphf801DV4IaeRNSPcqq3SNcO3oA6oOrGvL1wAiBsynui9SmuMPhqDiLj2T2NKP71CYmFWyIvoP7QRebxng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOtSfCRA9TVsSAnZWagAAd4IP/Ai7JYCC8bjOyXFsUG07\nrb22jqF2cIWpwT9kTMapxcwjfC3qqV/K4OLVhttScMqwk/qU/0E+SWzRH/ac\njRpz1YkMdLSbHyRKYhe2Dpw4Y5d9hL4mQxe/rMfv3tRR10/HMPVQGCDMHsd/\nYvadjPjnphgBNslBUTlog5m2GcUwVeCratfwSEa7B03ab1AGwNi3vl/tPU2U\nKPRvNgmL7I5jwK5PscappfM1Sp3+JWa58YcxzLXoh9kjH6zp4lwNKPckxK6b\np4WeGk1VPj8+EWsQWpP6PXO2BHyuFMkfhh1DB/AhUAIxjsCt9btPEMBXaxVk\nV5vch0LLv++nOaRKvDsBDhLA+YDn5oNM48HdqdBHFFNc5Htm/M71TtU4uVHR\nI0Rvz6mVAfBxkAHQOrBq+gzFIWlz+l1FLEMydNapW5l7yNFYg8jUxJmxNWHU\ngQetpmOm+dRD88X8/l1+apaviosECtBlaKgeBgBlVUT/9vRx+Mu9r4UayPY7\nJ928lklaDE2aUdH6rkUxQWGaSBI2jUFuM+cHTReNiQuV5VYnehp4EQa/p8xK\nT9vYSpcYtAexm5XD5/TcamzQFiHAHo7NpyEZDENh/+17spU/XZqBh1Sb7CaO\n6PVsYO3hcOytjWxNy+pxLjVi7VcOB6q+WzXHP71tmMMpGGzMcNI44hU8+7ZL\nrxPy\r\n=6Dsb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install aunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapExtended } from \"faunadb-fql-lib\"\n```\n\n## Functions\n\n* [`MapExtended`](#MapExtended)\n* [`ObjectKeys`](#ObjectKeys)\n* [`ArrayReverse`](#ArrayReverse)\n* [`PaginateReverse`](#PaginateReverse)\n\n### `MapExtended`\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way to construct a Page object\nin FQL so passing `{ data: []}` to Map will not work.\n\n```js\nimport { MapExtended } from \"faunadb-fql-lib\"\n\nMapExtended({ data: [\"foo\", \"bar\"]}, Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### `ObjectKeys`\n\nReturn the keys as array from an object\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n\n### `ArrayReverse`\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### `PaginateReverse`\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapExtended` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapExtended(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.8.0-1_1580913822941_0.2669004283103773","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.8.0":{"name":"faunadb-fql-lib","version":"0.8.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.8.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"fd12f69f20fb4ae5aec0e00be98943b66cfc8673","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.8.0.tgz","fileCount":36,"integrity":"sha512-gDt51G1IXua88COv3EtK5qvEmN5pJUj6rU3nWAcV8KQpPjJsCEvm9jo8BeMt6My8v3iQZ3j7UnSAoEa3OW1+Mg==","signatures":[{"sig":"MEUCIQD5Uh3+XuAYeBPXxHjPBXMhyaZe3DjqyQuu/yE9WB5rvAIgWxkVtk32y4FHbswFXbiup/vV8lUk0EfnByMpyv4NEA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOy+JCRA9TVsSAnZWagAAmPUP/Ayx9V5tFCkOREGSRqZ8\nl/NtI30RDP+uy/EGZp9YLK7d6dy5Lnlp2VQ84z5+HltVHOadc+qoaddHFpOJ\nN6S68kC1oR1HJQOLUE+4YjGaLgRxa+JbjhpdCx5pU9HUfpy5HJBgHQNeuXlj\n098NyeoT867j6fWvlpIEjdHzUv9Px5fTG3UE+fGYmqF0+qvDu7F3muPAQbwM\nWPV5Tf63hEZ8Y9tAGSJWo/UMvHX6vXGshUwSuDuMyKtR3WG0cNdxePfbASyb\n4Bsgf3vtaS5Yy5rdYtzYd1nfinz382FFrzluDZUhxPoIJA4yXmJn28ZcJ5is\nM6+1tU6ytj6/ExuzUqBc3+5U157qBW3Cvetjfa5YYl1IxyaXoIMmiZyw0R+g\n4Pcq7r4B1ajoVgc/nbwXVa1ReiHxyv9SqDO9b8wHu3BQBmElyYAI96iK3IfL\nApCx5dJYnxtULwmZlIm6QrIEcOuJp9hHdREup447x1fS8xHeSCZv8OYI8MHm\nCXhkGkcUfHWD3bbPXIRU8E7/jbaUG2OVucodhA861za9EsgAOupZgqOr+v8M\ncEsOQbB/HS6HYtr8w6aGUPmvJcoRswA3k2pOu0HfdzR/0aSxnQYP4fveWbNR\n8jonjO8fgKU30yf1m/m6eMFmtDav6xWJXxsPzBsE0lEM7b1dJUQ1m2r+437b\nohfv\r\n=q6Mn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.8.0_1580937097338_0.7143588150350175","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.8.1":{"name":"faunadb-fql-lib","version":"0.8.1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.8.1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"56dc649e81b956026769bae49344f8b554e73488","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.8.1.tgz","fileCount":36,"integrity":"sha512-kFfGX2owm1iC8dLaUAiS0yT5Jgkljih8T4Vsl1ZAo2o9vBX9nmheic5SpSpA/9as60JykdIfh8qkW8vRJh9ltg==","signatures":[{"sig":"MEUCIGr9DljLOxlUTnEjKFM/oLT1GkyZJ0jiqHwFZBzpaoSpAiEA7HP5zPMtgayxyEBMHbfTBDrNcCN12qV8ysS/JQ5+vu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOzNwCRA9TVsSAnZWagAAcbMP/RGy4VPsLFyZ7VnwdiUU\nAzfJAWOJpvMFOW3xkO1VrGPe9DIuLeM4XnHYl8GIN3Zhxo1oe6aHTn70JMlS\nrhObFOUaeJmcx7vo5lVnw0HYu6owybTdvDo1mqpsZFcbEU773muBz3rC9z1K\n8jged99L1UDxWvxfeppz0Z9eSGGKbBk1ekKsRen38Q6gRQLasa5zffrlqi0N\nVZMq9dTM5eDQMoMi9yscf/UfW9Fsaq+1/ucBDri1/z6RbfCipARhh4WMAPFM\na0Sesz4uYWS80kwebpABTmXYXzdqdQOLM3fevv9afEDR2kIp+qr6lU6zo0Bj\neQbuJTW5WroEbYWhbbc39huif513tw3DeoBAyNjy37KE/nxuHVf7tVq1na29\nkFcwI5GfDcVFMPGjBBRpQpzLJqEML8paabWHrgbSur/W9JKsxvnyE0sYVD2G\ndi7VBcEkBcgyxJTbgR2IdIhWMwUAzOBs+tl1QvhmLvJOzAXvAx+NSO5Rzz/g\n0nYbIRDSPV9kVLUzr7X3ANUcjE5Htb1VHVuE5lkblUODAKtiDy9KqLc304Nm\n3GJRBQ/dgdeBacMiq8yuq+5L21ezN6P2b0dr3JSW+VgdH61uklh0wEuP5nkl\ncpKR5YZE5nL68YjAJFAr7+D/0mTEE0rKyQWY5IY9+k0LKR5aRDj40sllS5tR\nYtP0\r\n=F5Hv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.8.1_1580938095712_0.6716374625217374","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.8.2":{"name":"faunadb-fql-lib","version":"0.8.2","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.8.2","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"dist":{"shasum":"fd70c5d7fddc565bca7f5df88e5e62a6ab61df84","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.8.2.tgz","fileCount":36,"integrity":"sha512-RwlJ5g/1BldNTkeLjL+fJV7HOPCx9sNIJ2DLEi5oXKO7juQ2Bk3exQySwB3CQie9QX0Hx+gxeddmta33NeVjrQ==","signatures":[{"sig":"MEUCICMobarPxZi9g3oa7kjxy8D9zTEx9elwiIU0eHIL2P3VAiEAorZQi9NDM9eeRBal1DFCGJCZL5GMX6eeaUrfwQdSx60=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeOz+XCRA9TVsSAnZWagAAtYEP/Ap8j1OHPxeuZ4/yvjby\nP5p9RFPnclCXMcU/BKzujLHzHP2XLfAEU3Kt+feSgjszo3wVoIHf05X+VwR5\nB1Ic6Ul6fRCYnJwLEwlm7blUJBTOUerTeHepIOA5wz4ZZgEWCYGWSGvVaJPA\nRNx++GBONaSIA+a/hI0GEzTf4ls44sPzIxG10to+a8ktA853B8m5uDtIXDEE\n4zNL4hYkazeGeZpc0YhVxg9Da9vTbf1qkhuJidvQgE7ePGXMf5iwzgbd0rpv\nRYkKtwQ08IOJW1nKMqg/l/ZX4YUpeOQeBo0FRJ/85U9DFtM1W6p6Ry3dLn4S\nhfaHYfERrX/8802whft7Rz0YdJ21qXlt1vZoaBCjyBAYgh5WTDTtxfyGbsGm\nUBZ3z+f3kZ5pbvZ5UJyLN2gpbmBiuggbDM1PYOXwwogdPqXgibgBzGphelj1\nFulyhqEL11wS44KtouT45y7C1BmoL4TnXRatHvF1SjJ8OaQ+9hjg+3vLuok1\nxZiM1fvhP2/GSWI3rvnmsR9T5jLn520HuaHvXcM/gqvYz+hanjEM1S/NlkAF\nHoWlViYOCU1wEz2CBb1cLkcaVZNIqpkTf5z7rn9FAYcDRAoepUvfYTWSaBM3\n3txXN5giUF0KKJ+fGQLGReMzb6jNC6WQmF3XnjM60mxVJy4uRENsKfvbcuXx\nho2b\r\n=V8/C\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && np"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2020 ShiftX\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"devDependencies":{"np":"^5.2.1","jest":"^25.1.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.8.2_1580941207007_0.8437782079005423","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.0-0":{"name":"faunadb-fql-lib","version":"0.9.0-0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.9.0-0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"1a4c3a7315e7b335ceb31e77ec093b6ae2668c8e","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.9.0-0.tgz","fileCount":37,"integrity":"sha512-1tCs1rDtiU7lloc8MxqT3d5qPHRjX0bX8VRvNVlBVTfKiRrs0aiqHHl2TKq5L4APAOJkgdow+4r1a6DLHOzNiA==","signatures":[{"sig":"MEQCIG4vUo+Le4MKCM+T94xqmSVtnYOptH4hQkD0eHY08NLcAiAIg12vthdC2XCEkMhqpi1P2U9h3k/lrFFxPjdUpv56cQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRTv2CRA9TVsSAnZWagAAXPcP/jX63v1nnJX/GxepMI+h\nEaes8OwgvOCBwGPOuPxKboQblsd3qtoHEIvw84znio/QMTmAo5BrCdm0i5I3\nsGHnw0smymVtDHZyQlY7F8JnNkTrA7pRAHDqdLyoJpKl43htpu8WzFMRA6Pv\n990OptbLf0a2anxUlfKbTsZrp/GllfKOBo7TaZTt06gwC6K4Yj7z9xZyVD4D\nXcrGSBqsv4p2N8DG1kgh9T8z+TLhj00gKAts4QQGaRyhUv1bs2noTeyg/5YL\nw/01LXTy4gYKJn+KYHE8jJgHKP8RxfpkGyVL89t5awkLv/aNh50SgOWPqVXS\n5q68N6P7hYvFaJ44LBC95vXIEOqwXa1oaqdxm/0fYoWzqHmOrVvp3Pt7fmeu\nRSgDNqppp+9oNvYuJdU54dRHMidq/Dn9wEvmA8VmIhhZiY7R+d/mXDyTJeAI\nwXZJjeB/7EbAkr8OjNDo7fpz+yNx7PFgSdLB6HO3HuGCjcYTao82feD1V5R8\nuGO+05PmgZAe8SDgytzuw6/A5YXcP02R8qrRj4cM5SOaiuRsnijkPu72pQhi\nKOUKmE9ajXayfXIr7r8NVfS7/JjAArgcdx4qH2edWUCOqPR2ss98SM0RELeU\nU+Fdyg7YEohyw2xXODW5fLKH6TvZjl2KWKpVQ4nV/1vc23VA526PDeuGNnCg\nMnze\r\n=4cYI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nMapFQLib({ data: [\"foo\", \"bar\"]}, Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nSelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nSelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nSelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nSelect([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nSelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"274e5f06e0755e7456ccb3f3012ae50840f11901","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"6.0.0","jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.4.3","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.9.0-0_1581595637477_0.11092221661474522","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.0-1":{"name":"faunadb-fql-lib","version":"0.9.0-1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.9.0-1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"38102148ada56cca57712d4ff2a84bc8e02ee0df","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.9.0-1.tgz","fileCount":35,"integrity":"sha512-lgIdYbvnSUJp/+uKhSP5cD6gF+jKGugXmoPklAhfvW0AKsNYdQ7q9pE9nSpacDocrh/7jUgY4x47x1OgUA+lIA==","signatures":[{"sig":"MEYCIQCmYstv3nWbbKCrikojZj/O1CaBZ9/SMl3SctDLCOC/9QIhAOWnhxCvd7q8y1DUbvB90RbKbk/Qym8hciuakDsNlYAc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeR/UkCRA9TVsSAnZWagAA0ucP/2prwkNYIQL8FUqPC3ef\n4nKSk0kVgmI9WlPVitW/4Z0+UKsnP0w/LLSW7n6+Vq8JwZ7tt48olJVMTdWd\n0d9fH/Vu9DVBkmwvegMg2ne9gaDvfpoPvJoXbWXZwbg+dPvax65O+sS23cjN\nRnyXk5H5mGY8K7tS+/0CG7caSoQ12vdW0dVyzqf+mgQZ8lLgUjIaIILonUt1\nhrZtA+ctv0TC4/+S1oi60HJsZsoKY87a3L5YhUvV71d7ZWhdrxIP6i5f0q28\nyKK9aA2MWPNLxkSiWbP7yc5U50/goxApOkdm4pXVUHw9V4AM24PDFpJn+SYr\nBiJw+IFY9WDMncYegZ3qySTfsXU4cDh0jXleRqrcEjEH4IxKmKdZr7yiT4J7\nMTRZpIKJYWDjcEL4Iy9U53+VyvItuvrSovrI18dxfpa5jF9Sww/gE49aZbj1\nT5h/cRDqp2UXz6ym5RGIL7f8uRGJkEJksbXzpH1gx5OebDFBCvYDq03wlyAk\nT/llTJqzTapfwJlJRnDI5Jg02/Sf6bG2fiGm4/gAK2n7X5Mn3Yz0te072uos\njOkzndT+HPFmHEoamsd4yTEcVb4GzPXuNXM8bMOB8D8mHhC42VvUTBw4x2kC\nYiMFVeJEypsBnfXzDRPlxg7wPl5OqajnrKk31AAWTvdqGzcxa0jsl4JOdnVA\nkpDY\r\n=35Rg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nMapFQLib({ data: [\"foo\", \"bar\"]}, Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nSelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nSelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nSelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nSelect([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nSelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"44d37c180cf71d2f7aaf6d8e106f5bc74e2ce90c","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.4.3","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.9.0-1_1581774115658_0.4233412920922972","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.9.0":{"name":"faunadb-fql-lib","version":"0.9.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.9.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"563bf331bd92aaefa2a9b89c609c6f835edd3c71","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.9.0.tgz","fileCount":35,"integrity":"sha512-d1TGvA78ZxPjw+wpAeFzZRAHKIz8troMDwFZ5paSENHZtOnWKraGZ2vrqtK+9zB/tpCR7kcOzk1LffmhZAKq3w==","signatures":[{"sig":"MEQCIG/kXKjvRIqBbihAswamLUtKrBd6KikMf6bMSaB5jDz/AiAyGSCxhZObhRQy8OInusz0Chwy/VRfF0fOfPFKXcINiQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeR/qxCRA9TVsSAnZWagAAPVUP/2FGHf0GFx3zNPsSdeKh\nIv2hjQ+7U7PuHr4h/7OdtSYJEyLqhYvHmDBtxEjH7LGCClOkC3o0gLHr+21N\nFATn+bVjsmz0SXl9jZT/IPbHuPhw7mlJzzhlGY96XR0gtqMM8h2rapqX0339\nq7oUruRRvxgwHkqLCKQmPoDyJkc4MXQf/UTnlACaIzo+KYZKB8KE6mvXlHkJ\nOTYV+UEde7GD9cHR8rqiqVRuyTkzYfOkr8I4a9yOdKYMK58P9FE/xwuw40ym\nu3W44jkGmA0POT470RmsN8Dyk+GKXb1b4P465leENYlHZzRnKv0MW3OSvpYx\nOunzuUg6t4xa0aWrkfE6wqyqZ2MiAfBMcfG49hlII6aWki8HUmAcxEPi+6pF\nn66PEEQcOzl6IcUpLA7eRR2kzphFvvikA+P3i/pNbIEt+gmXUxDQ+UfYtWbH\ngseMLbPUmS1wh6jDu/FxIyAFikL2Rhv1nP+ucM3z27h40MfHcw75BmQY5tuz\nfqjNXB9XXndWExPoqw5AYjW858u/MmYeIXVs0EnkNVkkhqd9HJ19NYVl+NaM\nF/LvT1yZDQ9pkdWa8VKSkWxWiv2ZKbCRpNhBRYeAHLntqa+f/ilVK3tzM7Vc\nsCk3pwk3hmqb5QHgxP8KhjchKiK5lvJQxxt+oNWw5O5Bx5k8/Fsfak4YLUqu\niIdh\r\n=Wv5S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","gitHead":"35c5baf321e1a6e6b318458e44f17b4a10c3366e","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.4.3","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.9.0_1581775536907_0.4065670610328631","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-0":{"name":"faunadb-fql-lib","version":"0.10.0-0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"925b2f81802d357df94c2d06bced4e8404844b5d","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-0.tgz","fileCount":39,"integrity":"sha512-AmPr32WVYOfSSUcfNt21t7S6y2G6biAy1ZfudT8DnMZxr3hTVmWgGt3rJKIVXQ6rF7chmaD89WtxasUEuj0yQQ==","signatures":[{"sig":"MEQCIBNbPUe9weuiZHMVGk2GqfTyPFMdkFjJ9qiXYgJ2utr+AiA7WV6rY0wIJttMyo55gt1m7Hb3PAC7pMfnKJmejndzpQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":51087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTZoGCRA9TVsSAnZWagAAMF8QAJLjRv4mMjUqgfdREWC7\nrrM84gXKG5b9DUrVwggmSY7n+lIgnxxkqLyw6ET4gzdvQpYOIiY+M761QaJx\nTlXw37clRryB2EdkDoPe157kK3ij1Sp7TzNQoSPOPdOGqJeo/EHCFeouyRW9\nxpJ/6R4/3KD4j7JLObiqRHz54m7UnaI1DD2fQ1Kbl4DWlYaUzA4xlGjOMeNV\nzxUaDSY0s2kUgA0YKVR9wk4aYbFvJhfVBe/Yfhu0Dh6iwWmTRL47VyMO/zKR\nd45GC+ybvDkvKRbNLNp9YteATOcxz1GsEmhCABpfdtcYgDfmS9X92ouWYKdc\n/E9jYXJYtyDFSs2RRwmf1GhULMybncjzHIUZsghHXRHZOZ6uIQo0tsSXXAO5\nqjwezXM1G17aTOIU3eaTW7vq9cfU7gQ0Bh3+tjdskI+BhGKHp9fvjHLYd9/B\nWRn8VGmmIXniOxqhZPP713EUqrByNMuBjqMy0bYmQEBOQwbS5W2ZWDZh+dHx\nBB+eue2gvGc92GVOIuhEdfY1VCHY0jAfCxXU5fBUDmOIxApw/lZRcN0SwFtJ\npfU6/DJYF1+iJ/xTAiH4hRzp8k9U2Hc/VypMMHvNEWqtfkmnQk5D/MeUVpGG\nkteBJv9PWVO+5Dtsn0LEGRye+6aoCoEGbPCJt9XIGQNhVqm73o1dy7g9Zvwp\nlzIf\r\n=vuEi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 0]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"a63987a823f4f39d5d7430b2890b338f5ae6b043","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.4.3","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-0_1582144005937_0.9469582249547435","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-1":{"name":"faunadb-fql-lib","version":"0.10.0-1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"0e7c9afae9f45e2b20b07e7a34f7c40a875f3cf1","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-1.tgz","fileCount":45,"integrity":"sha512-A2A2vffXcAjdligvtOMFezX+dJL4FYERbuw28VJ9Dcr06FEvuGmaDm5zsMsumAnUVeQYzfX9GXeEyz9xsz82Og==","signatures":[{"sig":"MEUCIQDaiBaY6LTyqCQmLJYkbkxifXuTBVP+8aAf4yHaYlI+ugIgaUEhM8HDhuM16CrEY7vukikeLjez62Qnvsv6FVDA0F4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":58326,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTkrACRA9TVsSAnZWagAAOwQP/ikYO3UK52Idq96ghowI\n/m+POU9LXzsLKREJGKVISGso5aeP/D6dPCqP2cX27Btkt8Cb2K8wCJCSz0o9\nhfNmMWyuqdi4VBTx5XcpC2ZfXlYP7gPQf0xt3vXyxezCF8G4MdN/DZN9oORB\nGoYCjUfkiNBRDu8C1HjDFZiPUoAOhibC6eMZk4fMrv4wa9UXXuEtjbjWNqMy\njH+Yg44yIrDcrjNsvLgN0Sld5rN9pDAwcgk0VI1IxelDGLhPPbS/mUvyOeV+\nUY2tq0suTwYupd44VZllebXWLtXYT/CqN8t3i6WFApI3N130co4huCQ+a47K\nOKuGPM5j3fD0x9fPwhjizdQmykAn7NWNMfq49TG7xMM7xUrU45bflhc08LT3\nuR2ASvXIATw2qWDsrUJmtQ8puu3yz06+g+olPlivUtgaz2rRwXXz0tCQxtvb\ngIf3GCil+4R+XrfUhoQfdq+wgfoUjEAspEegjc+r4FdT/T+Agq452jETp/RQ\n8D7+pkCRdioCXlQYUqC5lIOEmrhEfmU/wFsbgObdVEnjNlHl/DCzy/oRon9y\n18S8f4Ia1UeSsy6odmhUb0yjKO/rVSnBVSStNFrZ4OSR3PtyZWGCmHokK9Wq\ncjj5LJ0h+FCqY3z+N72heOWc2LwfeOiCO31LdOzxVP8rL2/55jP47gq02ZNu\nN9wo\r\n=/rce\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"93a648e52f0e2f0cdb19afe0417f555c3d632071","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.4.3","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-1_1582189247874_0.9527543813176622","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-2":{"name":"faunadb-fql-lib","version":"0.10.0-2","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-2","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"9a723ff7e07a95d7121a1db883a2dd95f33d410c","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-2.tgz","fileCount":51,"integrity":"sha512-EPNxY1fgP5LcTkUlt47ki5yXam8/Xu+rlvaV8oGntwrxtW0HPBWOCu1r35ashTLxIgpRWO6typ5baAJv7tHsOg==","signatures":[{"sig":"MEQCIF2i19q19ih9PY51S9vUJDtgZ8u52lE6dttRSGlbCTG+AiB+lkPt2KQcL7WXUyHRsCW4Lw6Jz/7phgsouhWBlvqPjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTnb4CRA9TVsSAnZWagAAEtsQAIIGA74yMhmTp0JTx85z\nATHWuPA/ypP1fso+Dx33OIDdgIdZL2OJlHlYZAs+uT0hMCTJlItgV/EfCbgZ\nCXLvDK9ma1ECyjz2Uop3Wq5rx2frbmORd+/Z1su4QqSZheJEOEF1DqMVLf37\nlh7gldt2DgdFp7uqmRHfF8YOuNmGgxSXjJl8eoUW5GoJAum/Ns39loj2IOMz\nB3SzdHtBsmzazO8ebV7+NqfpiNQN/3frGdR+4QeAR6xdzJUWsJ9tOqS7xdTb\n4n2wrgRVkvUY3kW/W2xuN0Rj1qgNl5VR65UEe0bcQ4RzbX1elNsBo7a8cYLN\ndO1tDv7UYB8nEw0U0LJBscDoCsiAILU25uBigQ/LEkiJRNQkisUpaFxMgODW\nB88LgGSfLFEYNk+T8/bIWwuHSwMDW/7AhPJBoLI1b1Nj484AQqIx8f45Og+x\nhYt1FO5i+m12yUNbYaj3uxIpgwMbBsB61R6zFk8OVvG0dnfuQROCgpZL1hYx\nWepDn+S2MJ6VsZFJsLDxq/aJdJWJq31XVlVOH+9I+/0/zjbq6605CF1YMV9s\nvlYTCfrNGpU0tSkNFH3Ce8NNy0a3nje/YBEer30Tg2UzCimbiYQT9MkIkKMS\nckQxEnjRKyr/kdSlMi8x76A41N8nAW1nkys8FGyYHJrB/Vt6xIGmTgW2++D2\nN/hA\r\n=J4UE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"eb5dbe85de3aa74c503abd4b4beeba6acf10b3dd","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-2_1582200567715_0.8881027905072316","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-3":{"name":"faunadb-fql-lib","version":"0.10.0-3","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-3","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"170353dce654fa5272f8064efa6ea88354f49a90","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-3.tgz","fileCount":53,"integrity":"sha512-CsOsMMhz8F17wBBiqz0vJ40C5njUs7aKapqcxG80DfBPMPmMfl3wo1QqSwfyjojVYBJEKsAlMzFNo7HzfIdnww==","signatures":[{"sig":"MEYCIQD9NocpApdJKaZja01gF3snCD/94pqwNHDIB9nLDTb7HAIhAL9x8sJPBaaAwD6dYIIJcORHStpVi3Zl9GaC3skSR/Qk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTn/PCRA9TVsSAnZWagAA1KUP/0i7AHHK0Yo5uz0ArWCK\nQuRVVWf5dlyhJRXgP37iFJrvpmcmvwVKD3zdgiltbQUbeNWsJgBCISbB1t6M\nvoOB/1JTrBBpqGZQKQ8xa9dG44GnPyMKgwwYU/NNZDxoSrjxYiCBOggyYv28\n776sWzJJl+ugV1ozmJim5CanE0ICGaq0fVReqLXl2ICth3zhKiUiMrSu+k8l\n3ThvIdJLDlHLWPfBtr1XCdPBz+hR59qiFzD3Fpce0oWw0V1kHJEQFtmnQ6jM\n7zQRAJm2eZ2vNd7JLWCoESgAZAXqtcPp75NUqhSPAUsuOERWuJWyiO+mNE4p\nZk0oU3Uo0H8u5P8hv8TJqVC24EBFc9ZoFXGYYqKmo3cKCYUbbCrVBGjhISxt\nvTsOyUPhJWoaz3gPt5T2X0vb+9igWtLINk688qwrMi0j65aWl9ACpmiI0Qs0\n+pHbF+Bv1ovlyzP3x/2qlES4nWyn36BVz1gcdoB/Z2ctXrIRFPj2uWgEhXUx\nwnHTSs/yR0kyY0uzPCODyJtF0NiX4vEpuaIDPBjDmDPcuTgFihPo+g+WYwVD\nZNWZgCqay9RehxX/FNR/HoSi25HNZL2Pl+f8sXdR0uAcmUxltRzFJsWW254/\nglkFA/z3agnVOZxfPcFRc/fSt5wngbRvhDSS87yZeVWAEbsFKUrbK5WwO/+F\n4y9c\r\n=lvbV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"0ce64f27e4d6ce93546c50b40e44aa473d353226","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-3_1582202830794_0.12080412775080474","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-4":{"name":"faunadb-fql-lib","version":"0.10.0-4","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-4","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"bc735124cd4e5b7ecd5fc47a6dc76742dfe1d7e1","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-4.tgz","fileCount":53,"integrity":"sha512-HMA1X708j9A+5cdv640C2c8TZQuEnb+8ktDfa5xcm+D72dioBn7JpdTjtuiExqWaE+enV9hp9uf8Aj2vJXADaQ==","signatures":[{"sig":"MEQCICce2beWbu+Sver+3L3o9LPOeShmf4FILrJniXuBSorEAiAyZoceQuRwnI0TzwcHQy51PsCOfyHtsN+7k7wT+tLaFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeToGXCRA9TVsSAnZWagAAKhAP/RaHNLvI5dzhbNaSwONg\nJlmA7lfWQ1omgLFP+XPEFevQuTQTXB3RJleP4xZ1WnW7BdBZA9hTU3E83poO\nsdhwJ/Jd8J7zbuDPhjgyTuuvhdYlmoaHHpvZb+eei78puHfeSKhS1QP7mXot\n8Jg5eYHW6grpczOj8JViNkG094o7ysVP6mvLp9lOkrmRhkzp15it4iavPOjr\nOKUoedKnsNq5lOEeasJsbrXN2Dywx4wGVLOBr/4yzMQO02c1T/30ryh3KEUM\n7yL9VkUS38y6BBriUy6O6xVLNz9zMzSMvN42Bc8BGgZPo56DENUvHOswlQIo\nAu4PSWN7qc531K4lmapPTxVuGqH3ASoc8SSddWB0qU1Tyl7a8o/1hxAXJ3Vq\nszD0GYlFpPXR1APUf6GC7295hIz5ibGawqSQqRcvNXK+kum/6u6V8vEoP/K9\nJ316LG2ObDFIUspBTd7u5oEXuDbPjTNX84JF9laJNMRrXjMCxzcADOyL+bwc\n87yjcsogCKswdgzDhag9a9/HV0JF6tE5JQxyS47JJvwOPvO23xUaKNa0GOAK\nsvPlqrc+wq9R+M11P6LN72yJbmQU3OIwfe/ep2LTd0GwBcna+gOE7t0pwRiL\nQipQKEMqP6DziMUe240mnFwPnwaX39f5m+GS+9KkuSZxaZN0twA7gt/7W/aL\nOBy9\r\n=aT+l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"6945bae10f79aaef174c36ed79fc5964f9eeadd1","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-4_1582203287245_0.13991680028688314","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-5":{"name":"faunadb-fql-lib","version":"0.10.0-5","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-5","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"467331930e34d7b64220aa52e137ff9e507389f2","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-5.tgz","fileCount":55,"integrity":"sha512-XVd9j494vBBypHpfeIo6unoqPO2FOPuY+LjEr/bR+y7mEBStHRmbgkeZEEI4DO8/3j3nLrPvywf4RB8uRSnznA==","signatures":[{"sig":"MEYCIQC1he7PffEuzc/gP6igFhRyg1yxim5sp+h5+cv5eN9XbAIhAJ5je10Rp/QykoTRPQU0PfokrzzTaEl7PkLQ4L9y/cZc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeT5/mCRA9TVsSAnZWagAA+fkP/j3pVE63JBXueJTVGPdr\nxdF88us9PIiMRxCeZ84Vor4J0518FKmv+NmuH38AuoOzQwxqRUu/oDCyY3fM\nncar/0QkadF9x73mLx+Gy1WmsJOX6DMJ5ZC2uQ/O5LBCpK98r/F4+Uh4/ane\nLG3kZ9zAI/h14zc9FPV5Eglvo8fMyiAEV4eRrJ0Z4aW6ko7dLVgj2Bxgs1aF\nCCK6+5c4fWbMIZsHQNoZD2udzPwYxQ8BF2RR9gSnby6kS6iCKc7eZw+PJwU8\nmrNWkorwFIVdg9dURkY3MgTM5Q2zK6S6BWCjbCt+ZaqrRglHJKO21aC0ognd\nOjowHkesxtkmit3mbJrfpfkdjX9QlVdGYVB9DghY/EpMeVYVwXciWpMWiWki\nR9oFJJnx6qR8yJ+2CSkOdYLfXFkFZkpLzHHXoaDPrWIX3Tcn2ajoR1RjzdTN\n9BD73oznQfV/gQb3jvSJusujb7q1FfwEbUXvkfg/swT1Y/U4mCu4RoPvTZIJ\nnGbCN0IQQr+Z5Z3bGuqWAgwO4M7RIJXUPC/w1Z51XMoySPBNQQvbhCZ9UqAR\nTnx8RN9mjoRMS7bsobBNM2FgwZtw89dDRKbQjpBQt+eWNoPxjp12gFW0G7XX\nfYBt5FIzVMWKgaPRjOqgwY4Q3/dwgFxn26EYSiKuXULGWpkavWlKbqr9xS/n\n1D4f\r\n=WwOH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"8e96e2699ef45cfa66d04a55eafba596a7fecd3b","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-5_1582276581784_0.34147631666854195","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-6":{"name":"faunadb-fql-lib","version":"0.10.0-6","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-6","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"9e23a8f8f30e982ef9dfe1a51fa33abe10d9dac6","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-6.tgz","fileCount":59,"integrity":"sha512-3iqSzUUzle9lB+93IYvesKmW1wTH5/tyPXzHYz/ocnaF5eZ0iBxPwe+VXEl8Rg+o3534Yg684bg6js1HJ6cCFA==","signatures":[{"sig":"MEUCIGtYLcGVFxZn2BK+QXP6UtIL5++gmQ9UroNI7cOxFtJpAiEA8q7S5axF8XLqGLXHtjxU1G2ZTdN/4tFDqNv/g+eT3Rg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeT7DnCRA9TVsSAnZWagAA53EP/j4ZO4BRuQxxDjOZHjR0\nbct1BwVrWUGxu0oWLgVLlAvKiOpffUnRLupbOPGy2MN4vCAba2RHZXepGL/q\n4P7fKV9kNVrkwi9G9+G2SowlTOoyQDMor5lTHNwBv35XBLdvkiJ7SHTTFmvq\nSyfqmjrxUl/gdMMJm2L2pAodlFjbvu/AUdr9g95AdECQkbFARnalmBpX2trS\n2KGuaqH6B7t9UZ6swLoV7bxwqDW8W6hUOkTq+u4wpZLpjcC1a5R9T/hpnbTH\nGPdEtmJV29uz5x+QKvxjz3EAWCxRuyRnQ5RWzoEsKaapzuixwZqdI+h30i9C\nA45phmyiyCd8bsU8E/NPr7/G8RDG/h3v2EEq1cLrZd03kyU5OPgt3ukixZx4\nM8+KwUDHC6joFjTfIPqEJwPgFY/DZ3ZEkt/8EDTWsIWma5izdt6/T/Thw6Ta\n/YTDgIWvHhj+MvRS4F13PTybt3IDIXSGUTE+MTk7J6c8WoD6eWnadWBeKqd3\ni6gHC5ySyXehCqO0BcQ+VGi4l7ZCKqeOQejGoCnDvEe6bSQ77C9PbPNfIosd\n6m5SAFGf4gkekesq34C56ZXwbxGdoYM31Hu4DJgWUm5FgE5SoqiIq7aKb1k/\nr6qNe/3plpj5XGkp/eYpkC/5Uqn2D8ZmXBn+L8CvdV+OyOvtwBnVi6phBKNy\nmGZ6\r\n=KqMU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"96362529066c702aaffeaaaefd93dc57e1e9bc38","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-6_1582280934951_0.8365662881494897","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-7":{"name":"faunadb-fql-lib","version":"0.10.0-7","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-7","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"bcca143d4fd02d66ce3c90b2adf3a8cb1235852d","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-7.tgz","fileCount":61,"integrity":"sha512-BFF1Hx14N/5yelFTmwCGEtqPFnp2nh40LMKk9rLczJOS9E+JbDr9Q1LVsU0ewadDyVvseHc08imJkvufQXPlug==","signatures":[{"sig":"MEYCIQDLWeXjD2G6S55j6rrFyV8V+zmqQPFNpexAP413p4haJwIhAPiyqoKL8bOYMc9k5f6L+HCpPLW7KAolpKc0MvQEHKRz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeT+MgCRA9TVsSAnZWagAAVbgQAJg857f5dG5FmZz3n+Y7\nXlA3EoeyXRHyesytMdofz0UNI/6BFg+XQrf8l62BdSOLBs1W9eFULyT0dgrD\ndyf6phl/QsVb7p3Ih17kG5hg+qulphaeynCGBGzj1YCfipI0BkmMRTNx6yTG\n0dbi1dlZwnOLyhE1qJ0Erbndp2hQcINkWgQkNmoxXVjn2W47vZ6FY9+l2xeE\nKSpjycGKpLvK3YTqUEgUZqRxVadAzIM/12xeIctpR7j/mfmMEC1D3ob+Jweh\nnO1pkbo9SleIyBcdAoLmlyAtHboY0X1gbGtjygHpYFEwLHuVFjH9Qx8mVCo8\nWd9rGWr1AXhGoPVViQ8dzSv7L/QdFQLCShTdebm/Sq5rqxjLvx93zmRqh2us\n3drfVT1CSmaK782xIS3O3f9Q5fkPXmyEv6uD1pZL5bDWi/YQFftMgJgCcrGm\nc6lTcocNxGub71dxAGGQTIfhGlKMlE1kL2FXdiEOet35FcZT4wYhM61dw+FR\njo2sGAgTtaW5G3whQzuGzKNR9+eVFvXj9eyLLv32IL2kOYVgzv6XnDDsItm8\nIYcycaDNA2J8D7Av1YFl7Myq+xcmPH61e6uR5shqcNPaoo6ATvfOo5bDqIaM\nC3cyoB0EWyZqlSV6caAph8BoGIIWXG7MaewxhxX5z9Fh807Bw9E7mSFLj9ns\nSy97\r\n=VgV6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"de896ba4d98c3204af7d1f6f3796aa83bc6a5bcd","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-7_1582293791660_0.4351818266855494","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-8":{"name":"faunadb-fql-lib","version":"0.10.0-8","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-8","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"2f3a66155ffa1ccab450630b3f49d0e95636817d","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-8.tgz","fileCount":63,"integrity":"sha512-K1/Ul5BoI6VPza9xb/dN4L4aYlOsQSvvSpxYJXsPmqhNmQpnYky93t3fawsyPEDOjvFCg5HLJZDgKDDuOTFI3w==","signatures":[{"sig":"MEYCIQDPWL+8VkaFTeXb9f56KCEMficVfWQ4ENYzRwUOAtRcPAIhAJoD7+K3qbrpucVgeplcsBN+z83E3kjJ71DZtVTc+nds","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVh+0CRA9TVsSAnZWagAAViEP/14X3YMONHuP5HD/BddM\n9XrqIqn1EtKkvwcrOoz1G4/rwG7WvStcDYfCnsnHsCi6kerkhFTPn8YLbloq\nET/N7+9TFuqhIZJ3Pid+f+aa4JDMf+QV4rZDucpGumbGWdu5z9V4hlVcm1uR\nh0dS784ZyJblLI5R1VzSb3cjvB2eJOWSfQ4hn13CKDLGHHbV02SaoifPyEtU\noXS/8BkA73qrb0Bpfy949nM1J2XCfAEE0MM0LZd9/zezj0/HE3yLDntWntb8\nwYkhCYqKaUj+t9aApoKTM+CeaGFa+ARNQoWUE5EI6khyXBPnKEtBdDT6CkBr\ne5iCVwXC6/4q4Tabuw92ZaVF0t/5fcQgeoSLVwFKPy/3mlGFJb8pwzbeZHAd\nRuEqF6qhf3bc1A9Yo3kfjgEgEI9etlDhGIxhwcAiZmFuufbWJISj/gV/kg7Y\nUjJZXfeCYaiEzer2m5YgzQw5F49fYUx3WVW9BSsoMcCSxJzKUN4celdbD2Gd\n/CzKYhniEqgvwtyWJqWOz+HTfnL29XKe/LRAEJigwA3LQnvKBsggU4G0qBKD\nZIdSbjTd7BOot/xORiUauJF64HZXt8wk+PAmlBAIB5mETrqMk3LRyEonDMOP\nPFpXD40WQiZo/DI1WppTNe8/aHQfCBkGQ8cgnzbT2OagoKUZSl+npIDFSq3Z\nAuqX\r\n=oK+n\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"71ecff2065b1f2a7e1edd755c56a5d248743eb84","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-8_1582702515831_0.23683762349476667","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-9":{"name":"faunadb-fql-lib","version":"0.10.0-9","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-9","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"ffaf6f6a65301a9d9871c2cbdd786a2de7d0061f","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-9.tgz","fileCount":63,"integrity":"sha512-mnRycfD6eFztFjaytr5gDNLbYJkIX4bVRYf4A1tOYhmKfYtYbR8MQXz67Rqjk+/bcwgNZNhSy+od5Rktxu0p7w==","signatures":[{"sig":"MEQCIHjxsv9YBXyvaZCNVOnps3+jHjqq7f+ryMh9mY+TAOiTAiAnK7mf0B5FIcsKMKq7hh2du65LMVKb82T90T5yoTmUjw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVmBcCRA9TVsSAnZWagAASucP/1zp8oDJV4OROMdcQFNS\nCrl6N8Si+5YGxiHtP9ASbKnvKko7qHWleneLzdftDzUzVaW6Jcc/meZbV1RL\nLo3jbVgQqIZx5rEQsuGBZ1lw06pEixjDxYNcJABobSmznp2MiLWK3GWENYea\nUzIJmhw/R8QDkTibMSzSabw7QuJ/o5c1bFknOZEUhoeKutOxiw2XB+de2JhQ\nYA1vBJtUbyJ96POoZ6zx/iwupYzIOTIGUohoq/DklrpyBfWzhE6xXdzotT5V\na0yqP0l8k+Gen6KfC1CVZuYqe5goeyfBQ264KCWKAq6/aEfP/JORMovjuAgZ\nvjBKVm8J3SUd4lssDS4Ml/yHL2GvipQ9UjwMYNio4FkIN3nxp50TgJCAZxSZ\nd/D/dv+y0GsDDsEtzLmfX6fA/ayGqCjJyKiPukd34V2FGDHaq3mY2oGx6xqV\nwD8bBw9d+bAMk8ajx0BTYoykvX9hsswiJabpSpQFMzRhD8HUtd5loa65yjbO\nKIHkOPLHTciUJ4MAeMc9DnrjL8HPnewWg6Bu9dHp6XU8F5G9NO2qMQI13FVe\nE6QVm9CVOGBwjCM1fN0DsUfepDSgdA1HvZE8n4wD8IK9zrOxphtlVJD4mH9A\ntzwRBFRgVUTNYJE/gcrg/xwvyv52f2Uh9vaXKJNWukDa3hrAo7p0F4iuBaGF\n6JMO\r\n=PQfG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"39deb9f8126e8d834f47ad0e0f087f641a54e318","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-9_1582719067943_0.2275603512381159","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-10":{"name":"faunadb-fql-lib","version":"0.10.0-10","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-10","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"296b57721d7016525d02ab375a478b33af359cef","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-10.tgz","fileCount":63,"integrity":"sha512-xOxXNAXfrxoMXMCrhiz+FAirpkDtYLhYsq0raxRhJwyCL3dtdCKuTE6x180ZywaKR2wryDQp07GMxVSGSgMZwQ==","signatures":[{"sig":"MEYCIQCMRglrRvGXLOBOmN911+QhS5MbJ2iRMOMcZMxwvS+sOgIhAIz9qCzwX/muLpC2erE7PEmfeZBHT5yHyQ++DuMZL10t","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVmFYCRA9TVsSAnZWagAAEhAQAKTFQ9k+u3eOyWtlyq06\nRKpAjIiPPgx1+P9h/MlTHPw9fD1hJv0GdgI7OfZ3Yn6jynVozMBEMEWC8PEN\no0zDIwD7fZxpdj2P1Fr0d1i3zFJnYdJiDbXkGvlU5TCnRk8nZ9BM7nMc7yrg\nqmlDss2bV18ECV/FDInXKlHjt26E889BThYLNBc2mE3YIRrqb7qcJCjbrWa3\n9mzA2/eS3l7gJDyMjk5ssqJf1dyPcsrcYNp2EbDooaZ/REUkfvmXTyMHGStt\n6oOf3HtBzjrgw8A9PxR+x19Q63YDjmUFcjM3KR8fqwfO0J8HQN5FHxqgG330\nNisqjJ/G793+Ao46QOniKNwpxxIencxezwYFJjWbvROXl+7Dcf78kQmX0l5p\nqh12L0kE35f5g0m+a8wqzkJ3QkQ78RyI9ilRoA8PfffnvCU+H+wvenHnBy6C\nwK+YgzX1h6VybfU4nem8eFLdK27OmmOPWXTVhnxNNwuM2hj+UhPr/pACVjhm\nscOopqCQ/agHllQL0RTqS8gtnYCfBfNAygOBmq9sWBYgGEkp3q42Pm7DcAaT\nDQHdCHgENUWr2i48z2pISxRPSZWoqJWbpaKvTVzDAQQLFTwz3sV0g7EY9uzk\nI6a30z1edqh9FqYn1F2pneD5/L2B/MHjuURtlUZP4O2idCdUUbWOM/0E4Zr0\nLr+x\r\n=fVY+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"84b956d5484a94f16d6eb54ef6a4355f3779b985","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-10_1582719320415_0.5710852593312759","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-11":{"name":"faunadb-fql-lib","version":"0.10.0-11","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-11","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"8894e8b282b2d2726417feed95b6df17aaaeaa17","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-11.tgz","fileCount":63,"integrity":"sha512-vczqLnHfuWPlPq+GCoH6vSDV3oLeLsEkiT5KGmgi8Ql48OJP2BioWYHXdtiq4i3CAr7ziK3VR2c3RGP3TujBhA==","signatures":[{"sig":"MEUCIQChBICYqOJT1HXuRxQQvM25mWhlCEhnmqpzZ8TgrLfGqAIgRpef07ulHt6ut8x0Cw9isKjrfwo5/ZQeaa/nu6HilzY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":70480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeVs4KCRA9TVsSAnZWagAAF70P/1MJ+1knLGCknXfBZNwO\n9iw7ZTUdyo80aJq0UGNTxnUNtNvV8DGguHYKl8USEdyNTeSSIn+DFIu4XDge\n/9hEifs+oRfn0mobb3fLh9NIayVhR9NDMsw9Qnz2XQV3zQrsC2eOaPwGYNla\nVUA5IoJGiQI2JcFLYOM5ggM6yMKOlHIXZuBMAF5etkIKAfvE5E9N3gz6hL+t\nsP6onL/iDk7hKfu2Ip1fRt7TehZMiialr0InzpxjyZ4MMtsOgw2wc0i3GtLW\nmp9f9P2+mfySVuOiIeu5b6Fg3XbgIKc7Q8LPKDWiNLlJYr6z1bBkuAeecSLa\nodWhWW5K0WjSawCm7keSUslC6oODT+Txzy2BPs8NOBTbqDB1qCUDJe9yXmgu\nXHpIUKM1HFS6yyPWQC725hopHAV9dpLkbVzvM9qhV8FgEV15g5HhZA55JMwx\nLgCeEUoyDQXUvRRXZFBDNnz6G6Tn41XLMgMIZIeg/CTCUROGiQRCuPvrB81m\nU1tA8rHo97YE6s1VrIwxiX3LwLIlGnsfoQ7I8JZPF56HdfUcULnpYJjMGP20\nCK1Vad14Fo1aE0/D5///2ocAHow9wrhGre1FQO4kuKpoLQouz3MFZeszTqU2\nQmAIKAOLFuLhTQ0sVv8Gwo2WVG0LG3Sgp/6P47Rn9dS1icP6b+UaHqLhQGzz\nErY9\r\n=wTiP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"d696f8aec652701752a8bf7fc76510c34815e2c4","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-11_1582747145442_0.3537516147896891","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0-12":{"name":"faunadb-fql-lib","version":"0.10.0-12","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0-12","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"b92dbc718b88082a4a049ab5ff6977eb757ed6a7","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0-12.tgz","fileCount":65,"integrity":"sha512-EyM1dp1vKDCiFArJ8Swb3oro7F2svZK1m1whkKYdaGBIKh6iMXl6xI1gUER0jWkufoSF6xYl9+TWMmuiNCvWvA==","signatures":[{"sig":"MEQCIHlsxRX1vJWshFodezGbyAiXzLSTvZsFh3YPKpXCARBoAiA8ZvzZOVSApCd/itwL3tnXa2NyIy3DOBSDbfB3pwzPkg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":72062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJea5JtCRA9TVsSAnZWagAAkbAP/2MRxtXAE9w4gJNBW/02\n2mXvVMZ6kikHZid+C7XDlvOrDup9LaZ2TT1DtwD/w9V8RT76TRpOv+2TGuAn\nBBWE6LKOct6Hs5HgT5UNkDlNyTBEIR4/jrPG4vhCCC6E5qN5W2HRXtrYXcWZ\n0vbVEGrqz2zke9mKaEtqUsQjYr4HSR/elwHTKtIaRJHFoDhmPS2HxRNl3zYr\nOPBodztnKrO++bARseTXPdZ59IabH8QXZDM0qzzj8DS84054Pat75mdieMU8\nanLKbo63SOfBBzbLSAqrv+xREu1IC+WPhdYSKjXCB05OPO2AYOQYIPeB5K6j\nVbL+nqd2zudhJJCkOvqUsR6E7seWqvfIrVXTuNs7m4k8Ej9bhu9eVlQRBpsr\nabzR1xkRpXaMohRAIVNK0ooGUQv0PPtZ9ZQyix9Y+Y28zl9tNURQgrhEeyn0\n619+73de1kMYcZeW+LOA8JeDtjrxaYaMFe/EvdwGSTSelJumA4VmkWpXVMZ/\nOxVqBvCQeawkL+ezYZWr1t9UxZdPhOw6NH0EcwFZs3gcDCaGVypq/gDBHCAG\nGNuE63OLZj+ozastXvUAbFAQJNrrVD5K2oDiQ9BBhVj60D6EXj9NbO7KbsoU\nz63Z5cer88XdVGcSq3Qo2aPnP66Mh1w2T+FMh2hcGLOLlRbSdWBwlIyVMmrc\nrImq\r\n=3+1l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nAll functions in this library are built using pure FQL. That means that they are also safe to use in stored Fauna Functions.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#ArrayReverse)\n* [FlattenDoc](#FlattenDoc)\n* [GetAll](#GetAll)\n* [ObjectKeys](#ObjectKeys)\n* [PaginateReverse](#PaginateReverse)\n* [PageToObject](#PageToObject)\n* [StringSplit](#PaginateReverse)\n* [ToJson](#ToJson)\n* [WithIndex](#WithIndex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"8b4f9f4e438637b3e7bb5c979df34deb85444b43","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0-12_1584108141200_0.43926911376682587","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.10.0":{"name":"faunadb-fql-lib","version":"0.10.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.10.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"7216d433bde0dcccf600c8162b870dca7ea2ebc1","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.10.0.tgz","fileCount":67,"integrity":"sha512-wUOdd5sLYEnLOKoyjM4tZADIBBcOuenHcDTIpjqYg2eN56J7JhZwPweWuNybpXJhBKdrw9JTiMhago06Dvrdeg==","signatures":[{"sig":"MEUCIQDAKr/Obca+eSm9nAcU4f67uuhnPsU4ECsSv0dFj/O+CwIgRCiM68sAs03CzMh2UjpYIjU0rQgYbnZXbKKy0e7hHWQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":76984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeb5zYCRA9TVsSAnZWagAA4lcP/jaMmDIrZGJQiQYaLylG\nwlPB91GFI2jmjIA8oepgV7trsz3Gqd/bV25gvl3NP3Df5Zm4cw72bxiyulqh\nuQFPrUIqUZvSxFZZHUjDlGdnyVmbDuINg37XACuG11l2TG5POv5L6ZHpcZOB\nUWI0cO4+QDXOIRsjewyO8oZ3RZeBOBVqmPeciNrwQxu13ItYA013bJhCIugU\nBynt4yb8+MhLxDathkTBTNBQYKlnlXh+mpGtPRTcFSuH/fBf50jJRXSY6Xta\ncN6yaF6Cdqw8ThFs1qOfOQ9DFbsqOQwqEGYpqkLEvnbPzXzIUDID4Wwv6cue\nVO5Wk9xS7QM/SfErVHt8djYloMqnRWmFixzRAlmUpiGDmB+y2m85L/TAnYDk\n71zEYcABe131TRp4B9qdN/tc0WRLqltrqP9Gk1KnCjrl26XM0s7pTR823RGq\no2jbC3leAJ9hYnXQGfrdGKPPqR9OWbhaiP3sofhGfArIjcCxIQpaNPfTcufV\nXoApO9ZtSU9A4asw8l/XcwpFyqvCXa5iU4hUWx4e0p1kTG+Q3ZziJO6wUtNs\nid1azjK78BQkBq9TsjjJygxsBJaHASRnoZFQfkodOxAtYF4dcp349R+kMweP\n8Rh0ive+URKLfTBuPhIMua1spJ795muQdG8yztEUV9YtcDVhPOTd0EGjpFIL\nRVmL\r\n=76iI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","gitHead":"3baace41be91f10cdfcb7ddf5f1710c491d8ac11","scripts":{"test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.10.0_1584372951924_0.0973503040969872","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.11.0-0":{"name":"faunadb-fql-lib","version":"0.11.0-0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.11.0-0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"37dcbc215a3d358f0f648912fe772cb5bcc52748","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.11.0-0.tgz","fileCount":69,"integrity":"sha512-HMMVTIU5iCoFR46Iy1uAh2kLrEHmaV92ReGt5fEXdpg+j8EC4afooMkOvPOSnfUZJ7S8OD/c+HOg1xe6GqVGTA==","signatures":[{"sig":"MEYCIQC+n+1y7NiODD/RuEfhpNyn1TBAqmomvF1LKRuo+RK5bAIhAIYbQsv2hZ2h7sLIgw5o0jn053/ZiZDfW4XpFQugUeBZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel15WCRA9TVsSAnZWagAAlncP/iNIjyk9KfadF6glqb+x\n5HeT60fQJHt7bxA0arHmz4z8xFbALgCV80xUVz1Lm2oIgRTgMmNM3pGos3Kj\nxRMjdfYjcWby2Yo6FcO/Q3Eu+KVV+aQVWscWJotrArA24nEeeIt6zSkz13bh\ntXyYmzeNyHMlelh5cqdt6m6alAmc6hZjZo4Be9XlXsdJc6RFAAz3fKntsWRu\nk6Sw66ATPJiggTWNF49zS0dg/WSfivNXpnq60WramIb7V5nmrFzwPxcfGMDh\nBKWYknyfLhnzEsslNXWTrNIK86BmjPxG5iQ45Mkr+pC2SqXpJN5nBnHrqkdk\nueyqtbggvkZfYC2nU8281UKfHVSufsDlMkU0e0RD0hG0OTSFg89Bo0VGMu9W\n948raM4asr1Crk5r70mAWlo+JyzSCmcH5Gpdihl/t15ID8hvjF6G832ep5Ht\nxtKOHsNvCsUT1lpAzaMaPtvhZVdXTq4UUnpLe/6Op9dKkMRA0YD7jM6T4E8Q\nbiiFwbj0XJ1CMzW7Mb6O8fn7+QXIgyYbK19rLnui1zoLoePn7Hj14mA9bxNt\nB7CoUWS8CZ9c3fA3hUSrrSIVT0pXc+jdWonjFHpFeVp/HQodUAIO0ekI9FVO\nK9HRPO2tSWEtdz07GjGHHMbAQYoWse2oNV2p69dnQy9d9iSdQZpFqTCvTqUu\nK1f1\r\n=nye1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExpetions are marked and will be made pure if possible by future releases of Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse)\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse)\n* [PageToObject](#pagetoobject)\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.String(\"Fallback expr\")) // => \"Fallback expr\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"6b738486ecfd08f4b907e92b7dd1b9dffb999ebd","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.11.0-0_1586978389842_0.77679775488913","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.11.0-1":{"name":"faunadb-fql-lib","version":"0.11.0-1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.11.0-1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"38744e7e6046da94b7738ad6b7879eca892f955f","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.11.0-1.tgz","fileCount":69,"integrity":"sha512-Ro+iAyxOOHLMUamHQBy8ywww69C8uEbvMMvvyZ/wnqy5O+DDSAzEQg7pw79m6p7xgYJmFfPoQxqPTf02DnU+xQ==","signatures":[{"sig":"MEUCIC38NIG6uoeDO+lv7utao+Km9ervypThNJR2UPMaGZ4oAiEAkRXF3QXpvkXNy9w4++BW+QuKfK2+TzX7bja2BpmWU0Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel2R9CRA9TVsSAnZWagAA0TUQAIm36Xkc9QCKITwRjFlW\nI7Ucc3CpOn2JMHDJm+ju0NX+EWJXh98jsgnCYYv3QE3eOYFkXxFr+S+Jy3RF\n0yHwlJk+ZVwk20E2CLLE5SIh5v52wT+bl6Wt1BK00RPAJbPhwEGVWZGrZYjw\n1G8/KgNA762uSBaULdjdsD4bCXOvVECugyxEMSyQRiOgGQbDzmOpbtrYGyt+\nOzg8/vJYsNw44QEGZOykTPbJcitjReJbVeLeC9LDFWjlz1q8ozNj+yKVrABi\nhR9xp5eVVxosPE+ZpbdcfdWreWG19eV2FMBnjadXkCKdiEbJl9dqOf48+MPy\nJgXlpl+cf+TLInQ/xWy+RS+k5AnjRKSy9irRBRIbXNtHrdt9iaUOZkbtb9cE\n48uX/2IYmbRVaUus8WvRQWv8B0a/Haqajlgi/PHMnC9RzDH0b89uDupo24xV\nKvtn1sUPsLoyUa3JpA8kgFCnD2mcp0FZky54YhPKtnua4uomqcSH6VIfoyZ1\ntyAE+T7wYQaYXxO3dZfpN+PWuxMmLY7Sb8Sv/VsVUGk5hEXoCkp5cg6Ifdxq\nl+bNEMofSTYMXeGcBXJ4bxzbBpB48310zVMTxBXDxD7DXfIAhcx+xOiEbPpX\nSJ0tHy2pTGG0XmQX1lBlm2HHYLCzJbGY0pw/NAWAZMvEXM9bQLznT8Z6WniJ\nuBf1\r\n=GmuV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExpetions are marked and will be made pure if possible by future releases of Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse)\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse)\n* [PageToObject](#pagetoobject)\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"94e6e937490fe18c80b4213953ed8d4d6192e156","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.11.0-1_1586979964957_0.7445284592577905","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.11.0-2":{"name":"faunadb-fql-lib","version":"0.11.0-2","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.11.0-2","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"03cd3d2f645319ab37e54378c7074e59b855def1","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.11.0-2.tgz","fileCount":69,"integrity":"sha512-qFArDRrEoYZ+tnvv27Ws16sOVt6uPF4fqftEQZnL8diwxlklFlkaEEErsuK+3C9yKPf3yeLQ4ZzOWZ/tJWDwlQ==","signatures":[{"sig":"MEQCICCbVRNHruFHvgcYUwpCnbyW0HjrShjDhp4LVwrTsmu0AiBHluDd4U6R8w/C/3Dm6ZpcswdE3pSnYSw0x5XL2nJrmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":80002,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel3VxCRA9TVsSAnZWagAAjakQAKDZiOtDqMY7Tb94U/jp\n1eMzaPZrmuuRkOCn0AGVYkop4Mp+rs9Ru3g7iPuPzA6NbdQVVaxSKQPJbWlc\n1hkCBT1bMli6VTWDJxdfpZydBURvu/k82RXSBtxfDN/eRG2FvLRbIljkQ2fa\nFPKBPtEp5VUwtZ9pAyqe0APHaSTt08st8a160b+OI6ArYblatOIosTGrZmOr\n6dg6RzJLBspjww1aMuWYYYXlRY8nhHekhps2ccD4osM3Bj9Z2GRHxSrjmVMP\nouwLMmFWCeZnxRKwY0Rt5iJ7ikUkhRENdq6IasPWOTi3ROWTbi+bw5QqwL3B\nPvtsPcaSnC2KpR99exVT/rRXd8GpxJGxGRYlGfrD7Rmk+Bobyb0kA/70lYmE\nj295EbBAmRyaOcElucns0UOoE2C5W9AN21pByLp6jUNU+xQtDH2B8tJue+TM\nWDSwr/jsulhqIO1fzh2Mr5gGdvAdmF8kjTR4pWEMr66nPAphgERFSkecoxyX\npzsWp3m84zJzUcIOMXFGPq6hEhC7D46dalqalq6FY6l6DBZQfXk6+SpVCRMi\n/NdM+go39lYxQpChS+voDlrYmEMl/eua6BD2YfjWJ3DsponTfzTfkfAzvbdY\nBrjq7aoV3O4uvhHb9xpMzwkU/FkuPnIdC6hqKv3HFqpGduq7JoZkZJ0pgPQu\nnUDm\r\n=ZMQl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExpetions are marked and will be made pure if possible by future releases of Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse)\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse)\n* [PageToObject](#pagetoobject)\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"94521bc4908df61aa8716b9502bfb9f99ad7bc9d","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.9.0","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"10.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.11.0-2_1586984304651_0.9819798475452426","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.11.0-3":{"name":"faunadb-fql-lib","version":"0.11.0-3","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.11.0-3","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"2960071de5238c85f537f652ca1b75aaf000956e","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.11.0-3.tgz","fileCount":3,"integrity":"sha512-bLy+XLAYAEgIjoKalbOtp6mS5iI63R7pBKrx0HHPAO2Rkm4ZeL8Q1REo895JN/PqesXysntMnndS8nNNGiyyZw==","signatures":[{"sig":"MEUCID+34ZrtVl8J1nqpWijY6rLp6Gbwe927vDC098a1fEMbAiEAk1TbDUrlLAduEXR2Mi+Gr0iokpSvsRbFKbX+6+k7ACg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNlFYCRA9TVsSAnZWagAAHcgP/A3gnnvxhfkbQC3RBpFv\najpjCz63GzEbnaNx3gAIl9ia6StMmF7HB/SE28WLIh6jkCc/ughZkL48eb/M\nTFQbRwEzlCjsPJLsXAWr7BGJ8l9KtL7gdlibbpd0MtFu5J4tUYbzpD2XdcXm\njON1CMsQcdQmHQuhRqrvYtXyQvgYwTFoul/8DWNQGDnuFI6+zuXhPoGoh0Mj\nGcay95drthM2k9E5GFm+SyeyzUMeoc/edeVUsmPcvaK6fukCubDTjfORe9NI\nnVD7PLaG5lIzk5qVxQPrLZb4KVTu0ij/KqDSGZGIg5xQ9/eu9rVeOhPj5NqZ\ngd4wkMURDCQyA8B6jgy38+6/hh3J6LWBkla+bhRfRbzWeRopP/P8WJjk5K+H\nDuE/UW9NsyTK2C430r46CAPGzT4IHJPI1lkz0X/0MYkTSMq6HP5yVyJjGJ/7\nitYLqi6NYyTaoE6CsFSqky9E7xphgqWxnB1lfRPCLILmXZX0yAV4/OFV5VUo\nTavCeAXzW5db9vZAgr/V4RXHnJIbUM7T++FK9BAqJMIELbaMelor/DRKMrO3\nbZBFLlyPi4eUviw5m0el+IGtGD82Qk4cJfaHJM5m/DHcXWdcXU1It1Cpc3os\nz5QJ90KUccxKZIcnepr1Ql5HzeYC3GLN/YQNBI8Kaw73PpTf9M9cShzN44L0\ngIgG\r\n=C5Rr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExpetions are marked and will be made pure if possible by future releases of Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse)\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse)\n* [PageToObject](#pagetoobject)\n* [RandomString](#randomstring) - Experimental\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### RandomString\n\nGenerates a random string of a given length. Provide optional alphabet.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.RandomString(10) // => \"1RsBc2SmCc\"\nq.RandomString(5, \"ABC\") // => \"BCCBC\"\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"2286073a8ad63928facc68c9f3cf5c3c567e84f8","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.11.0-3_1597395288489_0.9711223020926341","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.11.0":{"name":"faunadb-fql-lib","version":"0.11.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.11.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"68ce53ef552a0bf71503f0daeb30c7fecd7d79fa","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.11.0.tgz","fileCount":3,"integrity":"sha512-7syccjOZITdbQ+FC7oV6qgJ+0HXQ0ObFzOMysQcZlj/JlKqmeOsjCCKAbhISTBtbJtLNtHXHNnZNo8lmc6F6/Q==","signatures":[{"sig":"MEUCIEgpnKULVyijH/dGzdsZ341nCz/iOf0vpXjYf6/GN9+3AiEA9i+jwy67e8dEYA/VfjUUI9m+dTZmW7PRwRkIkL1asxg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNlJ4CRA9TVsSAnZWagAAx54P/ju9AsxvWLrcrb/o8drx\ny12A4tjZ1QhdTP3qJGB4lDa66NjFTAGXUE5FA2dvR1i6p8CJhEJjYcTvIK8e\nukwl8gWYFrZUsaZpX4JjQje7aeMsALJRV90+1sp2D9oGKoiB1toM3iGZ3pUF\nkiqphR7WSwpIdyTzHjZEWOsfmlUhGrofcP+CK+Xo96PusoJIyNr91CHWmOQ4\nkjQa5hz5Q60YeWuM1maZuqX0kTQ3yIx0034uE2JSjCeo4zkZ2peXxKKnYV8+\n0Adm/F3rfyIp/kAJfaNb5qtQgYrCET5LoO3R8eiVbwh2RF79OXeMIr1pFZLm\nqrh9gb3B1T5ZAH4qS47J70hTsfWGltfOPQP5tbw5mBxiEDpUJkrnYeTjyLk8\nKOza84F66HvDK/R9ZcIo4psqPLZBxRVNzXLN3T9a9CxeyY0NqzyODC52klp7\nXFDNWcj6OEAW4wr3F2g83VOkxznzZPa74C4GtOQedxabwbB5S41VLzz31rzR\nzsZJqKPV/BdqLNCbcTfaN4tc9BHZwil9Kx5LyqoKFogfdV44Uv3PbIih2X8Z\naa+JzjvjUkmvUs6j23+5MvYOBEGpeGsmcE/IU2UF5uK+3iDSfDFNp1a5cb9G\nCEClvHFNZDFdz865f/S3vUB5IPelhEgE/KXI8Q/mC7VU4r8E4L85w4O+HNX0\nmCCw\r\n=Dkfu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","gitHead":"71d7deb26946a10bb3e56865e82eb56e2892390b","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"deprecated":"Publish error. Use 0.11.1","repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.11.0_1597395575899_0.32686874772587626","host":"s3://npm-registry-packages"}},"0.11.1":{"name":"faunadb-fql-lib","version":"0.11.1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.11.1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"af87dbe76344df10d01669d79e33f7391daeda7e","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.11.1.tgz","fileCount":71,"integrity":"sha512-mAfaayXZCa4MHiNMgslr9IR4QlUeiksPT6h6YSSLlH0rySBFFhXCniKOfAG4vwDZ8/CdZlNgDh2Rt7fxuo5Ibg==","signatures":[{"sig":"MEUCIDG4ymd5dMn++uRkJYJgIJYKT19PHePzSZx4q6KPYZ+9AiEAh2YR58uEGf159yJaRMLFu6LKY1G5bdwn4Ip+xQoxnbU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":83514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNm0jCRA9TVsSAnZWagAAzEsP/irfzCcYqMIDIbdsnZ7m\n0oRmb1ozT1Y4PbnblikRpdB6+h0EX2odJdVlw8XnFs4/XF5I0TwEScoVuNOl\n5qE1AW4NeoBfgtBk5QgzVG9ZE2FUj6+ExzIahRTXqcvi/3MXXCizmhzPJ0ZM\nXfy2p+ehW26wDGz0UPtrAcghEaLSlyOfCwfiBxrinwKKhfgagU8XvAC3HzSV\n/AGo05xTtVLy4EVe+7Ssx4WmlvBnP1rz1O4wioqVOZhpDuyDEq0XBi4/sAl7\nyKlOBRMPcykMse/sfwEfCqBmnc86LUSjgxsxg8W/NldYR4PlhLe407Ud8Kog\nUHnW2UQs8nbXlO/jZt1QePcDYdomwIK4DJglqehg8KadVeptW8JO26WjOzL5\nGUHLPVkkPZ7AAvH6QxxUs9wuztJ1TscM81MAjPvh/yXTaAk4vclt8CEcoZPA\nupvZOPXK2kPl3ehPq56J3lje0PwNjNmSVq6PtnrdV8aiglqiAbAndIN4jmWb\nRRvdOCFLQzW/Q/W4hPT8+FGd56+74HW9Ebr+Y0lw6NfbUCtLwGNc8TqW+vj+\nm8pTEZh1rMrFWB/sB1n3uYsM0ZROl0Iq/esIxZxfKErzds/bPn40WLvl+Uum\nIgM6E3KSD8JClZbHWz/07idXUjf7DbKMiZzfkbIBLE2J3cAi9xbgDjp9fgwi\nJwlb\r\n=nKF+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","gitHead":"db9d80bad7c272a2e106035d7b74a074eb3ab796","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"^2.11.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"2.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.11.1_1597402402761_0.1509850923157705","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.12.0-0":{"name":"faunadb-fql-lib","version":"0.12.0-0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.12.0-0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"4b2a1d32982cbf2cdac4828cfeaf15364545102e","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.12.0-0.tgz","fileCount":73,"integrity":"sha512-4F2XH5qfPcqoXSVJC2jnWxc4CBGm1bHOoieXiwaFsDD0R/CkbDJWpD0U5ld8Pkw09YrXFAHcAzMO8uaaxtO88Q==","signatures":[{"sig":"MEYCIQCZcNc3MRm1L/T0gz+97mGu2GIgngDugft2jHQ9mTSk8QIhAJMi+FqtoTewCfk6oLigI+wVeCsvKPyDgv1OVePI0nN6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffW4ICRA9TVsSAnZWagAAuuEP/284q6XJYZzArJaNCroI\n+WubbmNrRxIY2Q1Noy6KZoYqMmFNdGUHI/DwcIuy989xzKHwIIs7HDzGTDrz\nR+MwM/XjvxuixKSdvGJcYks8OHjUelMLdRingfyX/BsZeIcGgYA+Q3PtTNWr\ndvAxEzG59hCdTqToZNdysYWTIbQmA/x54SYkUInnGHppfEu8dDN9nPSjA7dd\not63RUaImv1eLJNtlmUdO37Via6p14stw+ax6RFJPdOz2LVKmRuiuB39gFD0\nKOI/bzEyf34vtP9sUuYCwRIpd4fxwp5PlKYVP+3GbdYTCBP2N0RhadHvb81G\nO1jUZpx+ffclkp3Y/k9natOj+zlYYLeNcMwB4WVHZlg9ISLS0pn6O1gjTOrX\nMFtBfrbG4iCzIZMpOogTyurBrBSrS3MJipEz72/MKBcgJkCcAxDUh1q4H9gR\ndDbSb1R+F6jvoSIw7NMmvxg6EHHO/qCVevtZ5ReNQPJm3Mw8JdOCkO5Pjb3f\nn9mY9f4k0suXF8n3TsjV7mr0Dgik7s7hHOY9WtfvWjJOZWYtamJN6oA6susl\nmOVZqKvXQA4f0/nYDg/S2Ylm167am7cgrmoXAluf/u2OF3EZ5M9hHCoekm/F\noyEBY7lvQf18ijisiDGbCES9L620MZv+u0nVKLdQOtW12Z7TG+CbdFjoHcSU\nmhHz\r\n=WxUi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExpetions are marked and will be made pure if possible by future releases of Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse)\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse)\n* [PageToObject](#pagetoobject)\n* [RandomString](#randomstring) - Experimental\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### RandomString\n\nGenerates a random string of a given length. Provide optional alphabet.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.RandomString(10) // => \"1RsBc2SmCc\"\nq.RandomString(5, \"ABC\") // => \"BCCBC\"\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"1dec068fa8b58bc368d6c65c4a405f1ac1d58b4e","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"3.0.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.12.0-0_1602055688182_0.4040878118939779","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.12.0-1":{"name":"faunadb-fql-lib","version":"0.12.0-1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.12.0-1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"7887ce246b37a1f0d886fd2709fccccc89af1a82","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.12.0-1.tgz","fileCount":73,"integrity":"sha512-O06JmxjXWmIVKIWiAtY+5Ou9R7MpG8NTt15V6pzXqkBDgXxRm4G8dTk4y3g7nCRyVAmwTJzoeYcYgitfPrTwTQ==","signatures":[{"sig":"MEQCIGK1jUxomkZafcIAZq053qJJwOjRF5ztqap2gcYlBvuNAiAqLcL4eyKgDQ3tZ24ZVvIkk4XbXCf+a2LlobywjspLtQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffXBOCRA9TVsSAnZWagAAkT0P/0eIgAzlYlzzNdyL4QsJ\nuhRG1qjeH9odhRL4xSX1RIXLEdrmrw0Jh7iETVUTp9jHacWGWOVb02jsmTTC\ntdhFklqSbT5REROeA2W14yzivAK2tv6t57eeXrSccfmrfak5gYFfUdGhFwm2\nJh4CZ++3DbBGc+pbmZOk7fsQrZ0jn3Gvueyv3QVq1k50cLw3l2PpbIZF0/7g\ntlEHrmljrae6xy6yofXd4l/wP/h1NxNSK3Ju98nQ1MpkOe4lZef3E537WjhS\noPUb2DVJ+yPe5P3ZVoiBMC6bnB7k+liT/SSI74a7VoLyuLxulQfwQfwsfFa4\n8zGuBHtGK9BJrGfY653hD4ANJDN1gr6ek378dW8hrvhmV5YpmSDqTiR+z2wG\nd3w1zaiy9EEr15qGVmJYETq1KKF0lHmjI2VFSAGxbaYzMjX8i/sGWyTh6++5\nSkSiduokm+hLuZeFheMDui1INUzKjMg0uOmuXCkIFnuxgKHXYSJdDCpiuwmo\nFW8dGYSpgON91+BRyM9a62En9ckqSMzFK9xCbKYorDCQRg0BYVEijCdvEHGv\nN8cJJCK8gLI/p09eYEr5toBLutTbCvuJeszYTnBQfxMhvO3goqeNoDHcbFvo\nrGyeB9a6lYutJwocwB6Ij991ZcwVCyDeUl8gYqD1i3gKsetu7ABJdPzy5hfM\nJOll\r\n=zlE7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExpetions are marked and will be made pure if possible by future releases of Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse)\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse)\n* [PageToObject](#pagetoobject)\n* [RandomString](#randomstring) - Experimental\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### RandomString\n\nGenerates a random string of a given length. Provide optional alphabet.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.RandomString(10) // => \"1RsBc2SmCc\"\nq.RandomString(5, \"ABC\") // => \"BCCBC\"\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"4d4b6949bb540db2bbf2b84df495b6f5dc956c84","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"3.0.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.12.0-1_1602056269472_0.38075781499827244","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.12.0-2":{"name":"faunadb-fql-lib","version":"0.12.0-2","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.12.0-2","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"202565fa81a40f86fb7b5e690308c1dc359994df","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.12.0-2.tgz","fileCount":73,"integrity":"sha512-kJ4z3xLhoPnUMn8ntTBIrba1aT1gQf80w9hAaqVvnAYLfVDSXp9h8W1Nx9JVqjRA2vfzsQI86HVDrubA5Zbp6Q==","signatures":[{"sig":"MEUCIHSAugaLpbQKL+3b6vdRwShFDZNQzCAj/P0Z8bMRxNoEAiEAtGMphOT1rSPs3gLz2wwkssn38udZ1UzEgNcEvnmTIfU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfip/PCRA9TVsSAnZWagAAWr4QAIHpDuEHxJXNePIa6Onh\nbaPWuHbkRZSu8d3Xy1H5gIRqyeWc1xJZtbggnPktaz+Ee4t7KQ6fVuNpQPQc\ndaJ9RIb1CKEVyDxaQNXUImcBybWFw1H7EITG0Bh5Am3dVzOFr7icbonPREz9\nMEH4mu/Jg+bdYkMUqkrBkeu3GADnX55NsgntV+xx+AwwVh5CSu86hMsepMvr\nRnzPYiwzZfN9DsRmeinSI8e1JUCPjpIHB3PsnpZcBruaAwpo0N/Uqf3xNoyk\nV+GCgmBdiTcE6j0R1psQYCreN2UeTzYrOwkgDPz0L9+W6g3DGPQ6k4hEsQCs\nbFRIIJ+7fGpPbURc5aku18fcVgvuo1k6NZ3+upMhW82xMkBSiqc7yaN5xrUh\nbol+kTBDdMEN9/Br9f8ylf76K3QuFMhH3wFN4DKr2wmAw4nWVBKAsF2d2YiL\nTuU9RXqg95UomuYg1kGZ4/Jucg8aWWS52IaWuuo5RcqtJ6d5Oc28evuElIrr\nRnHxQo4GDIKhppZi7ipiunIhlz2MPIJYmwzY0GYsuvLp1zTfqZTDM4xQdTSX\nEAEyixd09z9PH6Chq+75Rfkn60nUCvlqmA4b9G9oHKB4Ipfhw9YcAe7K0yrA\noIkhQVkbqzBD1ObRjYyYQdhlE8pSBSAasY1WRqOa+oSbkTramhkasHmTPSeG\n6xUN\r\n=H8m2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExceptions are marked and will be made pure if possible by future releases of Fauna. Deprecated functions have been replaced by native support in Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse) - Deprecated\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse) - Deprecated\n* [PageToObject](#pagetoobject) - Deprecated\n* [RandomString](#randomstring) - Experimental\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [Sort](#sort)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### Sort\n\nSort the items of an array\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Sort([8, 2, 4]) // => [2, 4, 8]\nq.Sort([\"foo\", \"bar\"]) // => [\"bar\", \"foo\"]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### RandomString\n\nGenerates a random string of a given length. Provide optional alphabet.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.RandomString(10) // => \"1RsBc2SmCc\"\nq.RandomString(5, \"ABC\") // => \"BCCBC\"\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"fe3532cf2d4c24e77be9090f42b583db9fe9d225","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"3.0.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.12.0-2_1602920398583_0.5159617942877341","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.12.0":{"name":"faunadb-fql-lib","version":"0.12.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.12.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"7f8e2135e5b4d799a70c7168be96e6b57f7869bb","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.12.0.tgz","fileCount":73,"integrity":"sha512-sFz6WEjbYHSrRlIKcUcifxfI6pSp1+PFazmAH414cIPp+bPTGHGgEHtDkVJKLfJcIGg4PEboNuwJ1GbB+/84Tg==","signatures":[{"sig":"MEYCIQC6q6QwGKwoM+aAlfC4cRxeQe5UM4bxYANWP5ACsxDvSAIhANcGAFr+2J26FZoBW3YfUnY3nDKYSilLhqff/HvTt5IZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfiqGhCRA9TVsSAnZWagAArKYP/jz8N9c7YcF7asQvCV1V\nTVmAnvorQDv63HX8tugR5nkeOum8XY5t1YUkLyoWM7zrpIHsM2q/qFAI1iSp\nitpdfWC/PzD+Ml3S34l78gqxiP8d0I6OBRiB+s11NeHJHvr9cXOH4O68f6Dn\nKuaKYzQ8kHge6BDbJGtYqb967jMJRovAKGsim+Jc6Cn71DibeHXpeJD8SxDh\nlSaldb8ZcPXgcoLny8g2ZJasiMIMDna9fUo1UPfUibKwpZjbs/X2L27+rEHN\nCwUJC9cqFD0HYaP7PVvYWRJAt+PqzxZOOIun1gav+ZzyxihRUJR2EaGKftMO\nzAG9i6dDpz8FgonHgXoUqQnyk4N8b9RNeQyWUxVTdeCQL5DMQrOCw0lIJI88\npkoenN65Ek8yLDWc0ho/2/tLAwrfF1hdp2NSQstZIvwGnvN2YQnlSk2yCT5D\n0R9rhs2iJ19QwoyoUDfZ1eyCPtEcnLfw6/yKKKKP3jmc+eXNWuyWJwmssZ7z\n+THAB0zrkjztEbwoLDPW5Udl5WIyiB8vxsD3YcbdtxkoLaBCzyF5Nu4CxX8t\n9/Ey3diUWdrYeMwRwSpzy4iAQkGUImEwpMO/pi1R8k4OdKuoQmicHAgDDanR\nOGAYzs/zGg2zFeFATmJj1V60YJ1xfsRCh/GwFZqfqUyBsfCcQrniGZhnSe9/\nhemG\r\n=vorR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","gitHead":"01bbdf831a3015248c7987eea5398103f2e9370f","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"3.0.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.12.0_1602920865238_0.6036388132052073","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.12.1":{"name":"faunadb-fql-lib","version":"0.12.1","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.12.1","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"74f5f8ab854d790bd2a96fe64ba774c820bb8972","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.12.1.tgz","fileCount":75,"integrity":"sha512-Zgu4g/cipKKUD+qfaguKMDj86Jq6IhDD7Km/fKo6scNKvWg+mJVbITnpkcNHfn7uf1MozqwC3CrqyaT4NpMlnQ==","signatures":[{"sig":"MEYCIQCPT6kTan2ToJQCmrPt1X65Juswnp0G7pph7V86EnSzHAIhAOf21dIFFwT1HBvN2h5fSHkBAsqk8c2B1hPMoUarOb7H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90137,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfi2LsCRA9TVsSAnZWagAAeQcP/iiX9pls+VWjZ1tgiMbr\nrBAU9BWNiF5zpOboFR0HapxvhPImDNSWbqYIgNe+G4RvECdFgMJ7NALPRbCS\ndxdvfw5AE5TnXUhRkTuYxxexu261zfGNgHQsX1w5/8UlfMi2rYNJ0mqgSAO1\nnfnXreN4FF+9ZWGmKed6T63awRYDLT83sHiwXOfGyJ7HKdRnKxuhOJdtbqgT\ninbQ6mMP+yY3bNSxZjXHGzA/QNBPRKIZ1/2E4tfHcD9JmWsWAtv4QVI2IVhX\nWGxlWZ9ZI1N48j1/TgcgvLltD8FEYMGlmf/6C32u/FqI2o1OTgd4ChcqZM7D\nKxY3k8fgPxf3A9kMYNr0zB2/K16YPIAYZyBCAkOLdKZQkuXwdV2quZuHF+AB\nRlcLlFcVYG/83t5flp8bFnLuTp1j/4WGw1jXEZrU7O6ZSTdDHnq1mQYa/XM/\nW+6SL5SlqNgtROOv7Z9zV585QNg+W/Drm5fXxtSm3pXoyD4cFmKKxQtwKRPB\neVnPc7MXZBCF+/RacJVsOs+cSYFfFGw9TrM9kQmVq1oeEmDSPMy47PChj+lP\n0hpCz0NinMfYSWg1TS9XQ3uAZHmvDVz7sAhz6sEP6+9N1enLhhK/Qd3ll+jc\nNdftLqmcjxot3Tb14g5udxt3hSIV3is0NoQwh0Td3pWukVxUwG9MlJ1C0rve\nu5OO\r\n=/xAo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","gitHead":"447d30edce411068502b6002a4ca4311bb9161d4","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"3.0.1","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"3.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.12.1_1602970347477_0.8158185397860973","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.13.0-0":{"name":"faunadb-fql-lib","version":"0.13.0-0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.13.0-0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"6bf54d23c67e6badd29ac612a20c1d2f5d721297","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.13.0-0.tgz","fileCount":77,"integrity":"sha512-J7hRqBW9seFbpGFTCVYT0Sq6NLHZPOU/rNzsnBdHpf+2uV2Kk9nx18IbUdsrYrPdvRKUD7/F7cYQoI4a+ZD2Qw==","signatures":[{"sig":"MEYCIQC1Gxfnp85I97Nh1wDKKa7VmyLjpxkYKjHYQKsfboTiagIhAJwY/RAHxCJM1eiARvaqSaefks7cKT+XEUqd62Tmfl34","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0qZbCRA9TVsSAnZWagAAcXMP+wSPNyZIP/QT4ggPiw1o\nHkLqk863JqayZ8ZDAfR8xu7DQK06QJuqpBdFb7tHKjB8Wj/t44OgNB+bZK8v\nyd2fotDKI5i3ia29mBFIOcCJ8aks7TVmfuqezjp0typYyJXHzWlh5kxrazmh\npg7EnZSWtC++XLWtwPlj2EZkV1VvjC7A3u1m1H2aWq0avdZ1vXKj+b0k0Jvu\n/Gt5Siq45zL35aRryJ6DhrOchECuWSWL1/pUy6z+2YPtPw2gGPACI96n35GI\nO6K/xNcbKtiEYIbxhbxzkqxKWjrLowC8wMtgZRSLGWZy/ho09VynVeN+Y1p8\nAbyuFIj7EbmH45xcegcHc924uX0HSeb/nV4OBa5fa3LFttbZK5MJvfRwyYP3\nrKuJ1LK0IbgtO+HucEMrxinZtk42Mjm2JnuFmdkF4OpTU0NwaByhDZ+XKOMY\ne3BIN7T75aJxDQKuxf1O1Qe3i1QY7rXWOsV/xJ5nBlEdhQZscQ6POuzkdNaP\nOV7LE6L7oQyKg0bPSzSO8WOYP+zHM/WckgbGfLhZV314mWpSUjT31voFzRvo\n9ZqlK7hB1oc/z3yZ7FSVCK+nYqaoq49SlJsmFKj+3n2/MR3YtrKglUkFQCQI\nOsvCH4xCwbKmDeBn2JFiPqw2Yg9wU1rh+/c3XLCqqGa44KKSeHYPiSwQrY9u\nsOjm\r\n=6Q63\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExceptions are marked and will be made pure if possible by future releases of Fauna. Deprecated functions have been replaced by native support in Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse) - Deprecated\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse) - Deprecated\n* [PageToObject](#pagetoobject) - Deprecated\n* [RandomString](#randomstring) - Experimental\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [Sort](#sort)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### Sort\n\nSort the items of an array\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Sort([8, 2, 4]) // => [2, 4, 8]\nq.Sort([\"foo\", \"bar\"]) // => [\"bar\", \"foo\"]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### RandomString\n\nGenerates a random string of a given length. Provide optional alphabet.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.RandomString(10) // => \"1RsBc2SmCc\"\nq.RandomString(5, \"ABC\") // => \"BCCBC\"\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","browser":"dist/index.min.js","gitHead":"902bec0688f96a10ba38f0b080bde55b0830a16f","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"4.0.0","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.13.0-0_1607640666814_0.5669008761012544","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.13.0":{"name":"faunadb-fql-lib","version":"0.13.0","author":{"name":"Eigil Sagafos"},"license":"MIT","_id":"faunadb-fql-lib@0.13.0","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"dist":{"shasum":"c6cb126d4ad31a19d879ec7fe909050e3e2bd2c1","tarball":"https://registry.npmjs.org/faunadb-fql-lib/-/faunadb-fql-lib-0.13.0.tgz","fileCount":77,"integrity":"sha512-BkK42ipViIDf5JxpXhEx4uiaptLAf70zRNPr1IfLPSKyNe5DDhEj4a6SFNdL28kMvJCarPvAJ8XTFa9bHfYG2w==","signatures":[{"sig":"MEUCIQDBmMRrwXZWitxCablQtMZJh9Y23Z2B+Kfv3A0u7NrcvAIgLMDpwuA7A7bFwCeF3K5Gc42cKYVeQowp++FOWmiGL5k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0qeFCRA9TVsSAnZWagAArnIP/3wZUny9cF/q7qsrVoil\n1Q4F/oSO0na9/Kr1zPQ/EY/7fbMLFcXnjifCk7mGUnpmN0tyto/9WxcyKuSr\nLt7hJSxCCzF2LPQl7uXBkd3t1AeKvGed0mxkP6r8B707Ve/GAbsbgYEaqcSo\nFL8ur3wgE3JgGvK9Vbm6QaF1x8V6QJOCwaW4c0xTFbIxm3gO0dnQvOskKJmu\nqj51n9Wa2DZbx/x8F3OYAcyna3ivfEy6GhVxrOyqHf47hsN4PeriD03xsm0U\nUu4cgFrBUhbLQNOkmlg70QLaZHgRJPhiarz4oFZenVg8CJZrTZ300QL+i/ON\ntvoQKVz8NRZUsPjkR+yIeqANERhF0oFqf4hgMXC6PoenyhqdJpe/NOBeyxyj\nUMwIkC21BMSMVo2QyfxI79TVA6esHIfgVq3RopaqhGfLjm1qpq6oHLask68D\n8jqZy+qh9elMIeR/rO3BOorkGQtQmSxyucqPE4j859tXvSsQXK29eEjJm3v9\n9wJhtub9ZYDMUTkV9iheJzxm4JFVQWWarrJSrAFi97pvgyiTlomqdP4JQJCG\n7QLKI4tcyrMPr459GfmsMidX017U6ZFuQGpy82pYW0AbjobRa3KkEEdYzkHw\nESKYb8vy5jEpLO0f1VQSe2q4CQCZ/ImVs/CLyw6Dbt9LdqNotWfBKF24ikir\nIcOm\r\n=9rIC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.es.js","browser":"dist/index.min.js","gitHead":"8f332237231a62ef0e9ce41efd9caa8773e7be73","scripts":{"dev":"jest --runInBand --watch","test":"jest","build":"rm -rf dist && rollup -c && tsc","release":"yarn build && release-it"},"_npmUser":{"name":"eigilsagafos","email":"eigil@sagafos.no"},"repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"_npmVersion":"6.14.4","description":"A set of functions extending FQL by using current FQL primitives","directories":{},"_nodeVersion":"12.18.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^25.1.0","tslib":"^1.10.0","eslint":"^6.8.0","rollup":"^1.31.0","faunadb":"4.0.0","prettier":"^1.19.1","release-it":"^12.5.0","typescript":"^3.7.5","@babel/core":"^7.8.4","@types/jest":"^25.1.1","@types/node":"^13.7.1","@yarnpkg/pnpify":"^2.0.0-rc.18","@babel/preset-env":"^7.8.4","rollup-plugin-commonjs":"^10.1.0","@babel/preset-typescript":"^7.8.3","rollup-plugin-typescript":"^1.0.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.2"},"peerDependencies":{"faunadb":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/faunadb-fql-lib_0.13.0_1607640965078_0.9919240420690068","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2020-02-04T23:01:39.314Z","modified":"2025-03-11T17:05:22.617Z","0.1.0":"2020-02-04T23:01:39.436Z","0.1.1":"2020-02-04T23:08:53.194Z","0.1.2":"2020-02-04T23:15:08.623Z","0.1.3":"2020-02-04T23:25:30.380Z","0.1.4":"2020-02-04T23:35:37.761Z","0.1.5":"2020-02-04T23:52:31.153Z","0.1.6":"2020-02-05T00:11:07.808Z","0.2.0":"2020-02-05T00:32:52.326Z","0.3.0":"2020-02-05T08:34:37.479Z","0.4.0":"2020-02-05T09:08:34.096Z","0.4.1":"2020-02-05T09:42:17.352Z","0.4.2":"2020-02-05T10:04:05.685Z","0.5.0":"2020-02-05T10:27:22.555Z","0.6.0":"2020-02-05T11:30:12.840Z","0.6.1":"2020-02-05T11:35:42.383Z","0.7.0":"2020-02-05T13:22:04.347Z","0.8.0-0":"2020-02-05T14:26:17.331Z","0.8.0-1":"2020-02-05T14:43:43.122Z","0.8.0":"2020-02-05T21:11:37.511Z","0.8.1":"2020-02-05T21:28:15.862Z","0.8.2":"2020-02-05T22:20:07.257Z","0.9.0-0":"2020-02-13T12:07:17.594Z","0.9.0-1":"2020-02-15T13:41:55.816Z","0.9.0":"2020-02-15T14:05:37.033Z","0.10.0-0":"2020-02-19T20:26:46.075Z","0.10.0-1":"2020-02-20T09:00:47.983Z","0.10.0-2":"2020-02-20T12:09:27.806Z","0.10.0-3":"2020-02-20T12:47:10.895Z","0.10.0-4":"2020-02-20T12:54:47.358Z","0.10.0-5":"2020-02-21T09:16:21.926Z","0.10.0-6":"2020-02-21T10:28:55.054Z","0.10.0-7":"2020-02-21T14:03:11.849Z","0.10.0-8":"2020-02-26T07:35:15.968Z","0.10.0-9":"2020-02-26T12:11:08.052Z","0.10.0-10":"2020-02-26T12:15:20.511Z","0.10.0-11":"2020-02-26T19:59:05.545Z","0.10.0-12":"2020-03-13T14:02:21.377Z","0.10.0":"2020-03-16T15:35:52.013Z","0.11.0-0":"2020-04-15T19:19:49.985Z","0.11.0-1":"2020-04-15T19:46:05.118Z","0.11.0-2":"2020-04-15T20:58:24.831Z","0.11.0-3":"2020-08-14T08:54:48.608Z","0.11.0":"2020-08-14T08:59:36.002Z","0.11.1":"2020-08-14T10:53:22.922Z","0.12.0-0":"2020-10-07T07:28:08.357Z","0.12.0-1":"2020-10-07T07:37:49.679Z","0.12.0-2":"2020-10-17T07:39:58.753Z","0.12.0":"2020-10-17T07:47:45.368Z","0.12.1":"2020-10-17T21:32:27.610Z","0.13.0-0":"2020-12-10T22:51:07.052Z","0.13.0":"2020-12-10T22:56:05.214Z"},"bugs":{"url":"https://github.com/shiftx/faunadb-fql-lib/issues"},"author":{"name":"Eigil Sagafos"},"license":"MIT","homepage":"https://github.com/shiftx/faunadb-fql-lib#readme","repository":{"url":"git+https://github.com/shiftx/faunadb-fql-lib.git","type":"git"},"description":"A set of functions extending FQL by using current FQL primitives","maintainers":[{"name":"eigilsagafos","email":"eigil@sagafos.no"}],"readme":"# faunadb-fql-lib\n\n[![Npm Version](https://img.shields.io/npm/v/faunadb-fql-lib)](https://www.npmjs.com/package/faunadb-fql-lib)\n[![License](https://img.shields.io/npm/l/faunadb-fql-lib)](https://raw.githubusercontent.com/shiftx/faunadb-fql-lib/master/LICENSE)\n[![Test](https://github.com/shiftx/faunadb-fql-lib/workflows/Test/badge.svg)](https://github.com/shiftx/faunadb-fql-lib/actions?query=workflow%3ATest)\n\n## Quickstart\n\n### Installation\n\n`yarn add faunadb-fql-lib` or `npm install faunadb-fql-lib`\n\n### Usage\n\n#### Merged with faunadb-js query\n\nYou can import `query` from faunadb-fql-lib and the functions will be merged with all of Faunas built-in functions.\nIf there is ever a naming conflict in an updated version of faunadb-js then this will throw an error.\n\n```\nimport { query as q } from \"faunadb-fql-lib\"\n```\n\nOr import each function as needed.\n\n```\nimport { MapFQLib } from \"faunadb-fql-lib\"\n```\n\n## List of all functions\n\nMost functions in this library are built using pure FQL, and can be safly generated and used in Fauna.\nExceptions are marked and will be made pure if possible by future releases of Fauna. Deprecated functions have been replaced by native support in Fauna.\n\n### [Functions](#Functions)\n\n* [ArrayReverse](#arrayreverse) - Deprecated\n* [CreateAt](#createat)\n* [Debug](#debug)\n* [DeepMerge](#deepmerge)\n* [DeleteAt](#deleteat)\n* [EventExistsAt](#eventexistsat)\n* [Find](#find)\n* [FindIndex](#findindex)\n* [Flatten](#flatten)\n* [FlattenDoc](#flattendoc)\n* [GetAll](#getall)\n* [InsertAtIndex](#insertatindex)\n* [MapSelect](#mapselect)\n* [ObjectKeys](#objectkeys)\n* [PaginateReverse](#paginatereverse) - Deprecated\n* [PageToObject](#pagetoobject) - Deprecated\n* [RandomString](#randomstring) - Experimental\n* [SelectRef](#selectref)\n* [Slice](#slice)\n* [Slugify](#Slugify)\n* [Sort](#sort)\n* [StringSplit](#stringsplit)\n* [Switch](#switch)\n* [ToJson](#tojson)\n* [Trace](#trace)\n* [UpdateAt](#updateat) - Experimental\n* [WithIndex](#withindex)\n\n### [FQLib functions](#fqlib-functions) - alternatives to built-in FQL functions\n\nThese are functions that extend and/or alternate the behaviour of existing FQL functions.\nAll functions suffixed with `FQLib` already exists but behaves differently.\n\n* [ContainsFQLib](#ContainsFQLib)\n* [MapFQLib](#MapFQLib)\n* [SelectFQLib](#SelectFQLib)\n\n## Functions\n\n\n### ArrayReverse\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ArrayReverse([1, 2, 3]) // => [3,2,1]\n```\n\n### CreateAt\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.CreateAt(q.Collection(\"Foos\"), 150000000000000, {\n    data: { foo: \"bar\" },\n})\n```\n\n### Debug\nA debug/dev utility for aborting the query at any point and return a JSON object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Debug({ foo: 'Bar' })\n```\n\n### DeepMerge\nDeep merges two objects. Provide depth level as third argument. Note: Currently Fauna does not\nsupport recursion without creating a user defined function so the function is not 100% pure FQL\nand will need a pre-set depth limit.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeepMerge(\n    { data: { a: { a1: 1 } } },\n    { data: { a: { a2: 2 } } },\n    3\n) // => { data: { a: { a1: 1, a2: 2 } } }\n```\n\n\n### DeleteAt\n\nHelper around Insert. Will Insert a delete event at the given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.DeleteAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000)\n```\n\n### EventExistsAt\n\nCheck if there exists an event at the exact given timestamp.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.EventExistsAt(q.Ref(q.Collection(\"Foos\"), '1234'), 150000000000000) // => truer\n```\n\n### Find\n\nWrapper around `Filter` that returns the first match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.Find(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => { id: \"3\" }\n```\n\n### FindIndex\n\nReturns the index of the first item in an array that matches a Lambda expression.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }]\n\nq.FindIndex(\n    array,\n    q.Lambda(\n        \"item\",\n        q.Equals(\"3\", q.Select([\"id\"], q.Var(\"item\")))\n    )\n) // => 2\n```\n\n### Flatten\n\nFlatten an Array. (one level deep only)\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Flatten([[\"a\", \"b\"], [\"c\", \"d\"], \"e\"]) // => [\"a\", \"b\", \"c\", \"d\", \"e\"]\n```\n\n### FlattenDoc\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.FlattenDoc({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    data: {\n        foo: 1,\n        bar: 2\n    }\n}) /* => {\n    ref: q.Ref(q.Collection(\"Foos\"), \"1\"),\n    ts: 1234,\n    foo: 1,\n    bar: 2\n} */\n```\n\n### GetAll\n\nFor indexes returning only one Ref as value GetAll is a shorthand for using map to Get all items.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\n// These two queries are the same.\n\nq.GetAll(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    )\n)\n\nq.Map(\n    q.Paginate(\n        q.Documents(q.Collection('Foos')),\n        { size: 10 }\n    ),\n    q.Lambda('ref', q.Get(q.Var('ref')))\n)\n```\n\n### InsertAtIndex\n\nInsert item in array at given index. -1 will add to the end of array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 2, \"foo\") // => [\"a\", \"b\", \"foo\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], 0, \"foo\") // => [\"foo\", \"a\", \"b\", \"c\", \"d\"]\nq.InsertAtIndex([\"a\", \"b\", \"c\", \"d\"], -1, \"foo\") // => [\"a\", \"b\", \"c\", \"d\", \"foo\"]\n```\n\n### MapSelect\n\n`Map` and `Select` combined.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapSelect([{ id: \"1\" }, { id: \"2\" }, { id: \"3\" }], [\"id\"]) // => [\"1\", \"2\", \"3\"]\n```\n\n### ObjectKeys\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ObjectKeys({ foo: \"1\", bar: \"2\" }) // => [\"foo\", \"bar\"]\n```\n\n### PageToObject\n\nThis function takes the `before`, `after` and `data` properties on Page and creates an Object.\nUsful with other functions that don\"t accept Pages. PageToObject is used by MapFQLib.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.PageToObject(q.Paginate(...))\n```\n\n### PaginateReverse\n\nPaging a set in reverse is possible but a bit tricky. This pure FQL function takes away the pain. Use it like Paginate.\n\nNOTE: Wrapping `PaginateReverse` in `Map` will fail. Use `MapFQLib` instead.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.MapFQLib(\n    q.PaginateReverse(setRef, opts),\n    q.Lambda(\"ref\", q.Get(q.Var(\"ref\")))\n)\n```\n\n### SelectRef\n\nSelect and return the ref from an object.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectRef({\n    ref: q.Ref(q.Collection(\"Foos\"), \"1234\"),\n    ts: 150000000000000,\n    data: {...}\n}) // => q.Ref(q.Collection(\"Foos\"), \"1234\")\n```\n\n### Slice\n\nSlice an array by start and optional end index positions.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Slice(array, 1, 2) // => [2, 3]\nq.Slice(array, 1) // => [2, 3, 4, 5, 6]\n```\n\n### Slugify\n\nDowncase string and replace whitespace and `_` with `-`\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Slugify(\"Foo Bar_FooBar\") // => \"foo-bar-foobar\"\n```\n\n### Sort\n\nSort the items of an array\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.Sort([8, 2, 4]) // => [2, 4, 8]\nq.Sort([\"foo\", \"bar\"]) // => [\"bar\", \"foo\"]\n```\n\n### StringSplit\n\nTakes a string and an optional delimiter (defaults to `.`) and splits the string into an array.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.StringSplit(\"foo.bar.fooBar\") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo bar fooBar\", \" \") // => [\"foo\", \"bar\", \"fooBar\"]\nq.StringSplit(\"foo-bar-fooBar\", \"-\") // => [\"foo\", \"bar\", \"fooBar\"]\n```\n\n### RandomString\n\nGenerates a random string of a given length. Provide optional alphabet.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.RandomString(10) // => \"1RsBc2SmCc\"\nq.RandomString(5, \"ABC\") // => \"BCCBC\"\n```\n\n### Switch\n\nCreates a switch statement that checks a string and evaluates the matching expression in a matchers object.\nA third argument can be provided as default value if no match is found. Without default the transaction will abort.\n\nNOT 100% PURE! The switchObject provided can't be dynamically generated in Fauna and needs to be provided on the client.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst switchObject = {\n    foo: q.Add(1,2),\n    bar: q.Concat([\"Hi\", \"there\"], \" \")\n}\n\nq.Switch(\"foo\", switchObject) // => 3\nq.Switch(\"bar\", switchObject) // => \"Hi there\"\nq.Switch(\"missing\", switchObject) // => ERR: transaction aborted, Key 'missing' not supported by Switch\nq.Switch(\"missing\", switchObject, q.UpperCase(\"fallback expr\")) // => \"FALLBACK EXPR\"\n```\n\n### ToJson\n\nA simple wrapper around `Format` that takes any expression and returns it as a JSON string. Also great for returning errors in `q.Abort()`.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ToJson({ foo: \"1\", bar: q.Add(1, 2) }) // => {\"foo\":\"1\",\"bar\":3}\n```\n\n### Trace\n\nDebug function that will add a keyword to your position trace if the query fails.\nUsefull when debugging complex and deeply nested fql queries.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nconst array = [1, 2, 3, 4, 5, 6]\n\nq.Trace('keyWord', q.Get(...))\n```\n\n### UpdateAt (Experimental)\n\nExperimental function that will allow you to update a document at a given point in time and merge the change with newer events.\nPlease see test file for more information.\n\n### WithIndex\n\nTakes an array and wraps each element in an array containing the original value and the index. \n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.WithIndex([\"a\", \"b\"]) // => [[\"a\", 0], [\"b\", 1]]\n\nq.Map(q.WithIndex([\"foo\", \"bar\"]), q.Lambda([\"val\", \"i\"], q.Var(\"i\"))) // => [0, 1]\n```\n\n## FQLib functions\n\n### ContainsFQLib\n\nAlternative to `Contains` that supports both array and string as path.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.ContainsFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => true\nq.ContainsFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => true\n```\n\n### MapFQLib\n\nA wrapper around `Map` that also works on \"Page-like\" objects. There is currently no way\nto construct a Page object in FQL so passing `{ data: [] }` to Map will not work.\n\n```js\nimport { MapFQLib } from \"faunadb-fql-lib\"\n\nq.MapFQLib({ data: [\"foo\", \"bar\"]}, q.Lambda(\"item\", q.Var(\"item\"))) // => [\"foo\", \"bar\"]\n```\n\n### SelectFQLib\n\nAlternative to `Select` that supports both array and string as path and does not evaluate\nthe default value unless there is no match.\n\n```js\nimport { query as q } from \"faunadb-fql-lib\"\n\nq.SelectFQLib([foo, 1], { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"foo.1\", { foo: [\"a\", \"b\"] }) // => \"b\"\nq.SelectFQLib(\"bar.2\", { foo: [\"a\", \"b\"] }, \"default\") // => \"default\"\n\n/* The current Select in FQL always evaluates the default statement and will\ncreate a document even if the value was found */\nq.Select([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" + document created in Foos\n\n/* SelectFQLLib will only evaluate if there is no match, so mutations are safe */\nq.SelectFQLib([\"bar\", 0], { foo: [\"a\", \"b\"] }, q.Create(q.Collection('Foos'))) // => \"a\" no ducument created\n```\n\n\n","readmeFilename":"README.md"}