@slickgrid-universal/utils 2.5.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/index.js +17 -17
- package/dist/commonjs/utils.js +384 -384
- package/dist/esm/index.js +1 -1
- package/dist/esm/utils.js +358 -358
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{commonjs → types}/utils.d.ts +141 -140
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +6 -6
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/utils.d.ts +0 -140
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.0.1-rc/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/utils.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.14.4/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@types+yargs-parser@21.0.0/node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/.pnpm/@types+yargs@17.0.10/node_modules/@types/yargs/index.d.ts","../../../node_modules/.pnpm/@types+istanbul-lib-coverage@2.0.4/node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts","../../../node_modules/.pnpm/@types+istanbul-lib-report@3.0.0/node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/.pnpm/@types+istanbul-reports@3.0.1/node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/.pnpm/@sinclair+typebox@0.25.21/node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/.pnpm/@jest+schemas@29.4.3/node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/.pnpm/@jest+types@29.4.3/node_modules/@jest/types/build/index.d.ts","../../../node_modules/.pnpm/@types+stack-utils@2.0.1/node_modules/@types/stack-utils/index.d.ts","../../../node_modules/.pnpm/jest-message-util@29.4.3/node_modules/jest-message-util/build/index.d.ts","../../../node_modules/.pnpm/@jest+console@29.4.3/node_modules/@jest/console/build/index.d.ts","../../../node_modules/.pnpm/@types+graceful-fs@4.1.5/node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/.pnpm/jest-haste-map@29.4.3/node_modules/jest-haste-map/build/index.d.ts","../../../node_modules/.pnpm/jest-resolve@29.4.3/node_modules/jest-resolve/build/index.d.ts","../../../node_modules/.pnpm/collect-v8-coverage@1.0.1/node_modules/collect-v8-coverage/index.d.ts","../../../node_modules/.pnpm/@jest+test-result@29.4.3/node_modules/@jest/test-result/build/index.d.ts","../../../node_modules/.pnpm/@jest+reporters@29.4.3/node_modules/@jest/reporters/build/index.d.ts","../../../node_modules/.pnpm/jest-changed-files@29.4.3/node_modules/jest-changed-files/build/index.d.ts","../../../node_modules/.pnpm/emittery@0.13.1/node_modules/emittery/index.d.ts","../../../node_modules/.pnpm/jest-watcher@29.4.3/node_modules/jest-watcher/build/index.d.ts","../../../node_modules/.pnpm/jest-runner@29.4.3/node_modules/jest-runner/build/index.d.ts","../../../node_modules/.pnpm/@jest+core@29.4.3_ts-node@10.9.1/node_modules/@jest/core/build/index.d.ts","../../../node_modules/.pnpm/jest-cli@29.4.3_jcb3wguyhnpyd5azbry5ackz4u/node_modules/jest-cli/build/index.d.ts","../../../node_modules/.pnpm/jest@29.4.3_jcb3wguyhnpyd5azbry5ackz4u/node_modules/jest/build/index.d.ts","../../../node_modules/.pnpm/jest-extended@3.2.4_jest@29.4.3/node_modules/jest-extended/types/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"95f22ce5f9dbcfc757ff850e7326a1ba1bc69806f1e70f48caefa824819d6f4f","affectsGlobalScope":true},{"version":"54ab760221ee2dd8f30021df2925e37eba6c201219916435e9eda4e57d326f1c","signature":"953d4a00bbe1400ecb9d733d1d28cb049f3c990672b5cc0ff34ea29a711f9f28"},{"version":"4af8c78ed17e46cde04b067d8c72a511b0af5d195f6adb2708a82c1f89287336","signature":"7bb6dfa42f1353cfcd5a8dd77a509471436b3068e1a947deb309b39cc3c011ab"},"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f",{"version":"fc811ced095f38ad4438bb94a8d665c63bf4943e58a71ada16627add5ad93226","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5eb881ed2a0d5b17ea36df5cd4c4be500e460c412f270c3170e906bec65580ac","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"ed2a670a77a1b80653c5bde2d813b0ab2e92872cc9b2b611ce11050b95139be6","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","105b9a2234dcb06ae922f2cd8297201136d416503ff7d16c72bfc8791e9895c1","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","6cffc933aac260d5ac5d45a00b35454c98edbb6c0e80b964871b268cc199a871","43883cf3635bb1846cbdc6c363787b76227677388c74f7313e3f0edb380840fa","88dc553591ac933378f3b4a2711623d9fd2fb43d5e73617a8ced49061daf5a9a","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","6fa5d56af71f07dc276aae3f6f30807a9cccf758517fb39742af72e963553d80","253b95673c4e01189af13e855c76a7f7c24197f4179954521bf2a50db5cfe643","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","24e095a1c10c69209becca78540530d82e45429062595a6c9c8296fcbfe4857d","f380ae8164792d9690a74f6b567b9e43d5323b580f074e50f68f983c0d073b5b","0fd641a3b3e3ec89058051a284135a3f30b94a325fb809c4e4159ec5495b5cdc","a573e489ebefb1582a6164013d1f1b843ae0088a68e9a829738ad0f8466e040a","10ef818a2a33fc987778be894fa34210ec986e66d440dd5cc6f657e9dda4fd76","e6abd59914a314cc1a102335ea44603495c70bef843e6de6306b543c3372623b","6ab1224e0149cc983d5da72ff3540bc0cad8ee7b23cf2a3da136f77f76d01763","e059fb0805a29ea3976d703a6f082c1493ac5583ca8011e8c5b86d0a23667d0d","16fbf548a0337a83d30552e990b6832fd24bbc47042a8c491e1dc93029b4222f","0c4c7303956a4726568c801dcd81e9fbce32fbf74565f735bbcf46ba66417769","b91eb5533c4dc4775c728f08afccaaf8cce3d98cf556a56cad22a305a3f027e8","9249c34e7282d17a2749677c3521ea625f73c2b48792af08fa9c5e09abc6a882",{"version":"81defd88d24375881fb6da0577fa5570f29fb462019439e01a0e7b948fd57c5c","affectsGlobalScope":true}],"root":[45,46],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./types","declarationMap":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"importHelpers":true,"module":99,"noEmitOnError":true,"noImplicitReturns":true,"outDir":"./esm","preserveConstEnums":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"stripInternal":true,"target":5},"fileIdsList":[[54,93,100,109,111],[93,109,117,118,119,121,122],[93,100,109,117],[93,107],[93,103,109,112,114,115,116],[93,100,102,103,104,106,108],[93],[64,93,100],[93,103],[93,105],[47,93],[50,93],[51,56,84,93],[52,63,64,71,81,92,93],[52,53,63,71,93],[54,93],[55,56,64,72,93],[56,81,89,93],[57,59,63,71,93],[58,93],[59,60,93],[63,93],[61,63,93],[63,64,65,81,92,93],[63,64,65,78,81,84,93],[93,97],[59,66,71,81,92,93],[63,64,66,67,71,81,89,92,93],[66,68,81,89,92,93],[47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99],[63,69,93],[70,92,93],[59,63,71,81,93],[72,93],[73,93],[50,74,93],[75,91,93,97],[76,93],[77,93],[63,78,79,93],[78,80,93,95],[51,63,81,82,83,84,93],[51,81,83,93],[81,82,93],[84,93],[85,93],[63,87,88,93],[87,88,93],[56,71,81,89,93],[90,93],[71,91,93],[51,66,77,92,93],[56,93],[81,93,94],[93,95],[93,96],[51,56,63,65,74,81,92,93,95,97],[81,93,98],[93,101],[69,93,100],[93,100,109,113],[93,109,110],[93,114],[93,109,117,121],[93,100,109,117,120],[93,109,123,124],[45,93],[45]],"referencedMap":[[112,1],[123,2],[118,3],[108,4],[117,5],[109,6],[107,7],[113,8],[103,7],[105,9],[106,10],[47,11],[48,11],[50,12],[51,13],[52,14],[53,15],[54,16],[55,17],[56,18],[57,19],[58,20],[59,21],[60,21],[62,22],[61,23],[63,22],[64,24],[65,25],[49,26],[99,7],[66,27],[67,28],[68,29],[100,30],[69,31],[70,32],[71,33],[72,34],[73,35],[74,36],[75,37],[76,38],[77,39],[78,40],[79,40],[80,41],[81,42],[83,43],[82,44],[84,45],[85,46],[86,7],[87,47],[88,48],[89,49],[90,50],[91,51],[92,52],[93,53],[94,54],[95,55],[96,56],[97,57],[98,58],[110,7],[101,7],[102,59],[104,7],[116,60],[120,7],[119,7],[124,7],[126,7],[114,61],[111,62],[115,63],[122,64],[121,65],[125,66],[43,7],[44,7],[8,7],[10,7],[9,7],[2,7],[11,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[3,7],[4,7],[22,7],[19,7],[20,7],[21,7],[23,7],[24,7],[25,7],[5,7],[26,7],[27,7],[28,7],[29,7],[6,7],[33,7],[30,7],[31,7],[32,7],[34,7],[7,7],[35,7],[40,7],[41,7],[36,7],[37,7],[38,7],[39,7],[1,7],[42,7],[46,67],[45,7]],"exportedModulesMap":[[112,1],[123,2],[118,3],[108,4],[117,5],[109,6],[107,7],[113,8],[103,7],[105,9],[106,10],[47,11],[48,11],[50,12],[51,13],[52,14],[53,15],[54,16],[55,17],[56,18],[57,19],[58,20],[59,21],[60,21],[62,22],[61,23],[63,22],[64,24],[65,25],[49,26],[99,7],[66,27],[67,28],[68,29],[100,30],[69,31],[70,32],[71,33],[72,34],[73,35],[74,36],[75,37],[76,38],[77,39],[78,40],[79,40],[80,41],[81,42],[83,43],[82,44],[84,45],[85,46],[86,7],[87,47],[88,48],[89,49],[90,50],[91,51],[92,52],[93,53],[94,54],[95,55],[96,56],[97,57],[98,58],[110,7],[101,7],[102,59],[104,7],[116,60],[120,7],[119,7],[124,7],[126,7],[114,61],[111,62],[115,63],[122,64],[121,65],[125,66],[43,7],[44,7],[8,7],[10,7],[9,7],[2,7],[11,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[3,7],[4,7],[22,7],[19,7],[20,7],[21,7],[23,7],[24,7],[25,7],[5,7],[26,7],[27,7],[28,7],[29,7],[6,7],[33,7],[30,7],[31,7],[32,7],[34,7],[7,7],[35,7],[40,7],[41,7],[36,7],[37,7],[38,7],[39,7],[1,7],[42,7],[46,68]],"semanticDiagnosticsPerFile":[112,123,118,108,117,109,107,113,103,105,106,47,48,50,51,52,53,54,55,56,57,58,59,60,62,61,63,64,65,49,99,66,67,68,100,69,70,71,72,73,74,75,76,77,78,79,80,81,83,82,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,110,101,102,104,116,120,119,124,126,114,111,115,122,121,125,43,44,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,46,45],"latestChangedDtsFile":"./types/index.d.ts"},"version":"5.0.1-rc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -1,140 +1,141 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add an item to an array only when the item does not exists, when the item is an object we will be using their "id" to compare
|
|
3
|
-
* @param inputArray
|
|
4
|
-
* @param inputItem
|
|
5
|
-
* @param itemIdPropName
|
|
6
|
-
*/
|
|
7
|
-
export declare function addToArrayWhenNotExists<T = any>(inputArray: T[], inputItem: T, itemIdPropName?: string): void;
|
|
8
|
-
/**
|
|
9
|
-
* Simple function to which will loop and create as demanded the number of white spaces,
|
|
10
|
-
* this is used in the CSV export
|
|
11
|
-
* @param {Number} nbSpaces - number of white spaces to create
|
|
12
|
-
* @param {String} spaceChar - optionally provide character to use as a space (could be override to use in html)
|
|
13
|
-
*/
|
|
14
|
-
export declare function addWhiteSpaces(nbSpaces: number, spaceChar?: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* Remove a column from the grid by it's index in the grid
|
|
17
|
-
* @param array input
|
|
18
|
-
* @param index
|
|
19
|
-
*/
|
|
20
|
-
export declare function arrayRemoveItemByIndex<T>(array: T[], index: number): T[];
|
|
21
|
-
/**
|
|
22
|
-
* Create an immutable clone of an array or object
|
|
23
|
-
* (c) 2019 Chris Ferdinandi, MIT License, https://gomakethings.com
|
|
24
|
-
* @param {Array|Object} objectOrArray - the array or object to copy
|
|
25
|
-
* @return {Array|Object} - the clone of the array or object
|
|
26
|
-
*/
|
|
27
|
-
export declare function deepCopy(objectOrArray: any | any[]): any | any[];
|
|
28
|
-
/**
|
|
29
|
-
* Performs a deep merge of objects and returns new object, it does not modify the source object, objects (immutable) and merges arrays via concatenation.
|
|
30
|
-
* Also, if first argument is undefined/null but next argument is an object then it will proceed and output will be an object
|
|
31
|
-
* @param {Object} target - the target object — what to apply the sources' properties to, which is returned after it is modified.
|
|
32
|
-
* @param {Object} sources - the source object(s) — objects containing the properties you want to apply.
|
|
33
|
-
* @returns {Object} The target object.
|
|
34
|
-
*/
|
|
35
|
-
export declare function deepMerge(target: any, ...sources: any[]): any;
|
|
36
|
-
/**
|
|
37
|
-
* This method is similar to `Object.assign` with the exception that it will also extend the object properties when filled.
|
|
38
|
-
* There's also a distinction with extend vs merge, we are only extending when the property is not filled (if it is filled then it remains untouched and will not be merged)
|
|
39
|
-
* It also applies the change directly on the target object which mutates the original object.
|
|
40
|
-
* For example using these 2 objects: obj1 = { a: 1, b: { c: 2, d: 3 }} and obj2 = { b: { d: 2, e: 3}}:
|
|
41
|
-
* - Object.assign(obj1, obj2) => { a: 1, b: { e: 4 }}
|
|
42
|
-
* - objectAssignAndExtend(obj1, obj2) => { a: 1, b: { c: 2, d: 3, e: 4 }
|
|
43
|
-
* @param {Object} target - the target object — what to apply the sources properties and mutate into
|
|
44
|
-
* @param {Object} sources - the source object(s) — objects containing the properties you want to apply.
|
|
45
|
-
* @returns {Object} The target object.
|
|
46
|
-
*/
|
|
47
|
-
export declare function objectAssignAndExtend(target: any, ...sources: any): any;
|
|
48
|
-
/**
|
|
49
|
-
* Empty an object properties by looping through them all and deleting them
|
|
50
|
-
* @param obj - input object
|
|
51
|
-
*/
|
|
52
|
-
export declare function emptyObject(obj: any): any;
|
|
53
|
-
/**
|
|
54
|
-
* Check if an object is empty
|
|
55
|
-
* @param obj - input object
|
|
56
|
-
* @returns - boolean
|
|
57
|
-
*/
|
|
58
|
-
export declare function isEmptyObject(obj: any): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Simple object check.
|
|
61
|
-
* @param item
|
|
62
|
-
* @returns {boolean}
|
|
63
|
-
*/
|
|
64
|
-
export declare function isObject(item: any): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Simple check to detect if the value is a primitive type
|
|
67
|
-
* @param val
|
|
68
|
-
* @returns {boolean}
|
|
69
|
-
*/
|
|
70
|
-
export declare function isPrimmitive(val: any): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Check if a value has any data (undefined, null or empty string will return False...)
|
|
73
|
-
* NOTE: a `false` boolean is consider as having data so it will return True
|
|
74
|
-
*/
|
|
75
|
-
export declare function hasData(value: any): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Check if input value is a number, by default it won't be a strict checking
|
|
78
|
-
* but optionally we could check for strict equality, for example in strict "3" will return False but without strict it will return True
|
|
79
|
-
* @param value - input value of any type
|
|
80
|
-
* @param strict - when using strict it also check for strict equality, for example in strict "3" would return False but without strict it would return True
|
|
81
|
-
*/
|
|
82
|
-
export declare function isNumber(value: any, strict?: boolean): boolean;
|
|
83
|
-
/** Check if an object is empty, it will also be considered empty when the input is null, undefined or isn't an object */
|
|
84
|
-
export declare function isObjectEmpty(obj: unknown): boolean;
|
|
85
|
-
/** Parse any input (bool, number, string) and return a boolean or False when not possible */
|
|
86
|
-
export declare function parseBoolean(input: any): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Remove any accents from a string by normalizing it
|
|
89
|
-
* @param {String} text - input text
|
|
90
|
-
* @param {Boolean} shouldLowerCase - should we also lowercase the string output?
|
|
91
|
-
* @returns
|
|
92
|
-
*/
|
|
93
|
-
export declare function removeAccentFromText(text: string, shouldLowerCase?: boolean): string;
|
|
94
|
-
/** Set the object value of deeper node from a given dot (.) notation path (e.g.: "user.firstName") */
|
|
95
|
-
export declare function setDeepValue<T = unknown>(obj: T, path: string | string[], value: any): void;
|
|
96
|
-
/**
|
|
97
|
-
* Title case (or capitalize) first char of a string, for example "hello world" will become "Hello world"
|
|
98
|
-
* Change the string to be title case on the complete sentence (upper case first char of each word while changing everything else to lower case)
|
|
99
|
-
* @param inputStr
|
|
100
|
-
* @returns string
|
|
101
|
-
*/
|
|
102
|
-
export declare function titleCase(inputStr: string, shouldTitleCaseEveryWords?: boolean): string;
|
|
103
|
-
/**
|
|
104
|
-
* Converts a string to camel case (camelCase), for example "hello-world" (or "hellow world") will become "helloWorld"
|
|
105
|
-
* @param inputStr the string to convert
|
|
106
|
-
* @return the string in camel case
|
|
107
|
-
*/
|
|
108
|
-
export declare function toCamelCase(inputStr: string): string;
|
|
109
|
-
/**
|
|
110
|
-
* Converts a string to kebab (hypen) case, for example "helloWorld" will become "hello-world"
|
|
111
|
-
* @param str the string to convert
|
|
112
|
-
* @return the string in kebab case
|
|
113
|
-
*/
|
|
114
|
-
export declare function toKebabCase(inputStr: string): string;
|
|
115
|
-
/**
|
|
116
|
-
* Converts a camelCase or kebab-case string to a sentence case, for example "helloWorld" will become "Hello World" and "hello-world" will become "Hello world"
|
|
117
|
-
* @param str the string to convert
|
|
118
|
-
* @return the string in kebab case
|
|
119
|
-
*/
|
|
120
|
-
export declare function toSentenceCase(inputStr: string): string;
|
|
121
|
-
/**
|
|
122
|
-
* Converts a string from camelCase to snake_case (underscore) case
|
|
123
|
-
* @param str the string to convert
|
|
124
|
-
* @return the string in kebab case
|
|
125
|
-
*/
|
|
126
|
-
export declare function toSnakeCase(inputStr: string): string;
|
|
127
|
-
/**
|
|
128
|
-
* Takes an input array and makes sure the array has unique values by removing duplicates
|
|
129
|
-
* @param array input with possible duplicates
|
|
130
|
-
* @return array output without duplicates
|
|
131
|
-
*/
|
|
132
|
-
export declare function uniqueArray<T = any>(arr: T[]): T[];
|
|
133
|
-
/**
|
|
134
|
-
* Takes an input array of objects and makes sure the array has unique object values by removing duplicates
|
|
135
|
-
* it will loop through the array using a property name (or "id" when is not provided) to compare uniqueness
|
|
136
|
-
* @param array input with possible duplicates
|
|
137
|
-
* @param propertyName defaults to "id"
|
|
138
|
-
* @return array output without duplicates
|
|
139
|
-
*/
|
|
140
|
-
export declare function uniqueObjectArray(arr: any[], propertyName?: string): any[];
|
|
1
|
+
/**
|
|
2
|
+
* Add an item to an array only when the item does not exists, when the item is an object we will be using their "id" to compare
|
|
3
|
+
* @param inputArray
|
|
4
|
+
* @param inputItem
|
|
5
|
+
* @param itemIdPropName
|
|
6
|
+
*/
|
|
7
|
+
export declare function addToArrayWhenNotExists<T = any>(inputArray: T[], inputItem: T, itemIdPropName?: string): void;
|
|
8
|
+
/**
|
|
9
|
+
* Simple function to which will loop and create as demanded the number of white spaces,
|
|
10
|
+
* this is used in the CSV export
|
|
11
|
+
* @param {Number} nbSpaces - number of white spaces to create
|
|
12
|
+
* @param {String} spaceChar - optionally provide character to use as a space (could be override to use in html)
|
|
13
|
+
*/
|
|
14
|
+
export declare function addWhiteSpaces(nbSpaces: number, spaceChar?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Remove a column from the grid by it's index in the grid
|
|
17
|
+
* @param array input
|
|
18
|
+
* @param index
|
|
19
|
+
*/
|
|
20
|
+
export declare function arrayRemoveItemByIndex<T>(array: T[], index: number): T[];
|
|
21
|
+
/**
|
|
22
|
+
* Create an immutable clone of an array or object
|
|
23
|
+
* (c) 2019 Chris Ferdinandi, MIT License, https://gomakethings.com
|
|
24
|
+
* @param {Array|Object} objectOrArray - the array or object to copy
|
|
25
|
+
* @return {Array|Object} - the clone of the array or object
|
|
26
|
+
*/
|
|
27
|
+
export declare function deepCopy(objectOrArray: any | any[]): any | any[];
|
|
28
|
+
/**
|
|
29
|
+
* Performs a deep merge of objects and returns new object, it does not modify the source object, objects (immutable) and merges arrays via concatenation.
|
|
30
|
+
* Also, if first argument is undefined/null but next argument is an object then it will proceed and output will be an object
|
|
31
|
+
* @param {Object} target - the target object — what to apply the sources' properties to, which is returned after it is modified.
|
|
32
|
+
* @param {Object} sources - the source object(s) — objects containing the properties you want to apply.
|
|
33
|
+
* @returns {Object} The target object.
|
|
34
|
+
*/
|
|
35
|
+
export declare function deepMerge(target: any, ...sources: any[]): any;
|
|
36
|
+
/**
|
|
37
|
+
* This method is similar to `Object.assign` with the exception that it will also extend the object properties when filled.
|
|
38
|
+
* There's also a distinction with extend vs merge, we are only extending when the property is not filled (if it is filled then it remains untouched and will not be merged)
|
|
39
|
+
* It also applies the change directly on the target object which mutates the original object.
|
|
40
|
+
* For example using these 2 objects: obj1 = { a: 1, b: { c: 2, d: 3 }} and obj2 = { b: { d: 2, e: 3}}:
|
|
41
|
+
* - Object.assign(obj1, obj2) => { a: 1, b: { e: 4 }}
|
|
42
|
+
* - objectAssignAndExtend(obj1, obj2) => { a: 1, b: { c: 2, d: 3, e: 4 }
|
|
43
|
+
* @param {Object} target - the target object — what to apply the sources properties and mutate into
|
|
44
|
+
* @param {Object} sources - the source object(s) — objects containing the properties you want to apply.
|
|
45
|
+
* @returns {Object} The target object.
|
|
46
|
+
*/
|
|
47
|
+
export declare function objectAssignAndExtend(target: any, ...sources: any): any;
|
|
48
|
+
/**
|
|
49
|
+
* Empty an object properties by looping through them all and deleting them
|
|
50
|
+
* @param obj - input object
|
|
51
|
+
*/
|
|
52
|
+
export declare function emptyObject(obj: any): any;
|
|
53
|
+
/**
|
|
54
|
+
* Check if an object is empty
|
|
55
|
+
* @param obj - input object
|
|
56
|
+
* @returns - boolean
|
|
57
|
+
*/
|
|
58
|
+
export declare function isEmptyObject(obj: any): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Simple object check.
|
|
61
|
+
* @param item
|
|
62
|
+
* @returns {boolean}
|
|
63
|
+
*/
|
|
64
|
+
export declare function isObject(item: any): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Simple check to detect if the value is a primitive type
|
|
67
|
+
* @param val
|
|
68
|
+
* @returns {boolean}
|
|
69
|
+
*/
|
|
70
|
+
export declare function isPrimmitive(val: any): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Check if a value has any data (undefined, null or empty string will return False...)
|
|
73
|
+
* NOTE: a `false` boolean is consider as having data so it will return True
|
|
74
|
+
*/
|
|
75
|
+
export declare function hasData(value: any): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Check if input value is a number, by default it won't be a strict checking
|
|
78
|
+
* but optionally we could check for strict equality, for example in strict "3" will return False but without strict it will return True
|
|
79
|
+
* @param value - input value of any type
|
|
80
|
+
* @param strict - when using strict it also check for strict equality, for example in strict "3" would return False but without strict it would return True
|
|
81
|
+
*/
|
|
82
|
+
export declare function isNumber(value: any, strict?: boolean): boolean;
|
|
83
|
+
/** Check if an object is empty, it will also be considered empty when the input is null, undefined or isn't an object */
|
|
84
|
+
export declare function isObjectEmpty(obj: unknown): boolean;
|
|
85
|
+
/** Parse any input (bool, number, string) and return a boolean or False when not possible */
|
|
86
|
+
export declare function parseBoolean(input: any): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Remove any accents from a string by normalizing it
|
|
89
|
+
* @param {String} text - input text
|
|
90
|
+
* @param {Boolean} shouldLowerCase - should we also lowercase the string output?
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
export declare function removeAccentFromText(text: string, shouldLowerCase?: boolean): string;
|
|
94
|
+
/** Set the object value of deeper node from a given dot (.) notation path (e.g.: "user.firstName") */
|
|
95
|
+
export declare function setDeepValue<T = unknown>(obj: T, path: string | string[], value: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* Title case (or capitalize) first char of a string, for example "hello world" will become "Hello world"
|
|
98
|
+
* Change the string to be title case on the complete sentence (upper case first char of each word while changing everything else to lower case)
|
|
99
|
+
* @param inputStr
|
|
100
|
+
* @returns string
|
|
101
|
+
*/
|
|
102
|
+
export declare function titleCase(inputStr: string, shouldTitleCaseEveryWords?: boolean): string;
|
|
103
|
+
/**
|
|
104
|
+
* Converts a string to camel case (camelCase), for example "hello-world" (or "hellow world") will become "helloWorld"
|
|
105
|
+
* @param inputStr the string to convert
|
|
106
|
+
* @return the string in camel case
|
|
107
|
+
*/
|
|
108
|
+
export declare function toCamelCase(inputStr: string): string;
|
|
109
|
+
/**
|
|
110
|
+
* Converts a string to kebab (hypen) case, for example "helloWorld" will become "hello-world"
|
|
111
|
+
* @param str the string to convert
|
|
112
|
+
* @return the string in kebab case
|
|
113
|
+
*/
|
|
114
|
+
export declare function toKebabCase(inputStr: string): string;
|
|
115
|
+
/**
|
|
116
|
+
* Converts a camelCase or kebab-case string to a sentence case, for example "helloWorld" will become "Hello World" and "hello-world" will become "Hello world"
|
|
117
|
+
* @param str the string to convert
|
|
118
|
+
* @return the string in kebab case
|
|
119
|
+
*/
|
|
120
|
+
export declare function toSentenceCase(inputStr: string): string;
|
|
121
|
+
/**
|
|
122
|
+
* Converts a string from camelCase to snake_case (underscore) case
|
|
123
|
+
* @param str the string to convert
|
|
124
|
+
* @return the string in kebab case
|
|
125
|
+
*/
|
|
126
|
+
export declare function toSnakeCase(inputStr: string): string;
|
|
127
|
+
/**
|
|
128
|
+
* Takes an input array and makes sure the array has unique values by removing duplicates
|
|
129
|
+
* @param array input with possible duplicates
|
|
130
|
+
* @return array output without duplicates
|
|
131
|
+
*/
|
|
132
|
+
export declare function uniqueArray<T = any>(arr: T[]): T[];
|
|
133
|
+
/**
|
|
134
|
+
* Takes an input array of objects and makes sure the array has unique object values by removing duplicates
|
|
135
|
+
* it will loop through the array using a property name (or "id" when is not provided) to compare uniqueness
|
|
136
|
+
* @param array input with possible duplicates
|
|
137
|
+
* @param propertyName defaults to "id"
|
|
138
|
+
* @return array output without duplicates
|
|
139
|
+
*/
|
|
140
|
+
export declare function uniqueObjectArray(arr: any[], propertyName?: string): any[];
|
|
141
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,GAAG,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,cAAc,SAAO,QAWpG;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,MAAM,CAOxE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,aAAa,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,EAAE,CAuChE;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,CAqC7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,GAAG,GAAG,CAoBvE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,OAUnC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAK/C;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,GAAG,WAEjC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,WAEpC;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAE3C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,UAAQ,WAKlD;AAED,yHAAyH;AACzH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,WAEzC;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEhD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,UAAQ,UAGzE;AAED,sGAAsG;AACtG,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,QAmBpF;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,yBAAyB,UAAQ,GAAG,MAAM,CAUrF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYpD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAOlD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,YAAY,SAAO,GAAG,GAAG,EAAE,CAiBxE"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "Common set of small utilities",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"browser": "./dist/esm/index.js",
|
|
10
9
|
"import": "./dist/esm/index.js",
|
|
11
|
-
"require": "./dist/commonjs/index.js"
|
|
10
|
+
"require": "./dist/commonjs/index.js",
|
|
11
|
+
"default": "./dist/esm/index.js"
|
|
12
12
|
},
|
|
13
13
|
"./*": "./*"
|
|
14
14
|
},
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
"*": {
|
|
17
17
|
"*": [
|
|
18
|
-
"./dist/
|
|
18
|
+
"./dist/types/index.d.ts"
|
|
19
19
|
]
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
"types": "dist/
|
|
22
|
+
"types": "dist/types/index.d.ts",
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"> 1%",
|
|
43
43
|
"not dead"
|
|
44
44
|
],
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "54a5fa53390bc189754ead97f385bacfdf390d2d"
|
|
46
46
|
}
|
package/dist/commonjs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils';
|
package/dist/esm/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils';
|
package/dist/esm/utils.d.ts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add an item to an array only when the item does not exists, when the item is an object we will be using their "id" to compare
|
|
3
|
-
* @param inputArray
|
|
4
|
-
* @param inputItem
|
|
5
|
-
* @param itemIdPropName
|
|
6
|
-
*/
|
|
7
|
-
export declare function addToArrayWhenNotExists<T = any>(inputArray: T[], inputItem: T, itemIdPropName?: string): void;
|
|
8
|
-
/**
|
|
9
|
-
* Simple function to which will loop and create as demanded the number of white spaces,
|
|
10
|
-
* this is used in the CSV export
|
|
11
|
-
* @param {Number} nbSpaces - number of white spaces to create
|
|
12
|
-
* @param {String} spaceChar - optionally provide character to use as a space (could be override to use in html)
|
|
13
|
-
*/
|
|
14
|
-
export declare function addWhiteSpaces(nbSpaces: number, spaceChar?: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* Remove a column from the grid by it's index in the grid
|
|
17
|
-
* @param array input
|
|
18
|
-
* @param index
|
|
19
|
-
*/
|
|
20
|
-
export declare function arrayRemoveItemByIndex<T>(array: T[], index: number): T[];
|
|
21
|
-
/**
|
|
22
|
-
* Create an immutable clone of an array or object
|
|
23
|
-
* (c) 2019 Chris Ferdinandi, MIT License, https://gomakethings.com
|
|
24
|
-
* @param {Array|Object} objectOrArray - the array or object to copy
|
|
25
|
-
* @return {Array|Object} - the clone of the array or object
|
|
26
|
-
*/
|
|
27
|
-
export declare function deepCopy(objectOrArray: any | any[]): any | any[];
|
|
28
|
-
/**
|
|
29
|
-
* Performs a deep merge of objects and returns new object, it does not modify the source object, objects (immutable) and merges arrays via concatenation.
|
|
30
|
-
* Also, if first argument is undefined/null but next argument is an object then it will proceed and output will be an object
|
|
31
|
-
* @param {Object} target - the target object — what to apply the sources' properties to, which is returned after it is modified.
|
|
32
|
-
* @param {Object} sources - the source object(s) — objects containing the properties you want to apply.
|
|
33
|
-
* @returns {Object} The target object.
|
|
34
|
-
*/
|
|
35
|
-
export declare function deepMerge(target: any, ...sources: any[]): any;
|
|
36
|
-
/**
|
|
37
|
-
* This method is similar to `Object.assign` with the exception that it will also extend the object properties when filled.
|
|
38
|
-
* There's also a distinction with extend vs merge, we are only extending when the property is not filled (if it is filled then it remains untouched and will not be merged)
|
|
39
|
-
* It also applies the change directly on the target object which mutates the original object.
|
|
40
|
-
* For example using these 2 objects: obj1 = { a: 1, b: { c: 2, d: 3 }} and obj2 = { b: { d: 2, e: 3}}:
|
|
41
|
-
* - Object.assign(obj1, obj2) => { a: 1, b: { e: 4 }}
|
|
42
|
-
* - objectAssignAndExtend(obj1, obj2) => { a: 1, b: { c: 2, d: 3, e: 4 }
|
|
43
|
-
* @param {Object} target - the target object — what to apply the sources properties and mutate into
|
|
44
|
-
* @param {Object} sources - the source object(s) — objects containing the properties you want to apply.
|
|
45
|
-
* @returns {Object} The target object.
|
|
46
|
-
*/
|
|
47
|
-
export declare function objectAssignAndExtend(target: any, ...sources: any): any;
|
|
48
|
-
/**
|
|
49
|
-
* Empty an object properties by looping through them all and deleting them
|
|
50
|
-
* @param obj - input object
|
|
51
|
-
*/
|
|
52
|
-
export declare function emptyObject(obj: any): any;
|
|
53
|
-
/**
|
|
54
|
-
* Check if an object is empty
|
|
55
|
-
* @param obj - input object
|
|
56
|
-
* @returns - boolean
|
|
57
|
-
*/
|
|
58
|
-
export declare function isEmptyObject(obj: any): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Simple object check.
|
|
61
|
-
* @param item
|
|
62
|
-
* @returns {boolean}
|
|
63
|
-
*/
|
|
64
|
-
export declare function isObject(item: any): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Simple check to detect if the value is a primitive type
|
|
67
|
-
* @param val
|
|
68
|
-
* @returns {boolean}
|
|
69
|
-
*/
|
|
70
|
-
export declare function isPrimmitive(val: any): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Check if a value has any data (undefined, null or empty string will return False...)
|
|
73
|
-
* NOTE: a `false` boolean is consider as having data so it will return True
|
|
74
|
-
*/
|
|
75
|
-
export declare function hasData(value: any): boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Check if input value is a number, by default it won't be a strict checking
|
|
78
|
-
* but optionally we could check for strict equality, for example in strict "3" will return False but without strict it will return True
|
|
79
|
-
* @param value - input value of any type
|
|
80
|
-
* @param strict - when using strict it also check for strict equality, for example in strict "3" would return False but without strict it would return True
|
|
81
|
-
*/
|
|
82
|
-
export declare function isNumber(value: any, strict?: boolean): boolean;
|
|
83
|
-
/** Check if an object is empty, it will also be considered empty when the input is null, undefined or isn't an object */
|
|
84
|
-
export declare function isObjectEmpty(obj: unknown): boolean;
|
|
85
|
-
/** Parse any input (bool, number, string) and return a boolean or False when not possible */
|
|
86
|
-
export declare function parseBoolean(input: any): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Remove any accents from a string by normalizing it
|
|
89
|
-
* @param {String} text - input text
|
|
90
|
-
* @param {Boolean} shouldLowerCase - should we also lowercase the string output?
|
|
91
|
-
* @returns
|
|
92
|
-
*/
|
|
93
|
-
export declare function removeAccentFromText(text: string, shouldLowerCase?: boolean): string;
|
|
94
|
-
/** Set the object value of deeper node from a given dot (.) notation path (e.g.: "user.firstName") */
|
|
95
|
-
export declare function setDeepValue<T = unknown>(obj: T, path: string | string[], value: any): void;
|
|
96
|
-
/**
|
|
97
|
-
* Title case (or capitalize) first char of a string, for example "hello world" will become "Hello world"
|
|
98
|
-
* Change the string to be title case on the complete sentence (upper case first char of each word while changing everything else to lower case)
|
|
99
|
-
* @param inputStr
|
|
100
|
-
* @returns string
|
|
101
|
-
*/
|
|
102
|
-
export declare function titleCase(inputStr: string, shouldTitleCaseEveryWords?: boolean): string;
|
|
103
|
-
/**
|
|
104
|
-
* Converts a string to camel case (camelCase), for example "hello-world" (or "hellow world") will become "helloWorld"
|
|
105
|
-
* @param inputStr the string to convert
|
|
106
|
-
* @return the string in camel case
|
|
107
|
-
*/
|
|
108
|
-
export declare function toCamelCase(inputStr: string): string;
|
|
109
|
-
/**
|
|
110
|
-
* Converts a string to kebab (hypen) case, for example "helloWorld" will become "hello-world"
|
|
111
|
-
* @param str the string to convert
|
|
112
|
-
* @return the string in kebab case
|
|
113
|
-
*/
|
|
114
|
-
export declare function toKebabCase(inputStr: string): string;
|
|
115
|
-
/**
|
|
116
|
-
* Converts a camelCase or kebab-case string to a sentence case, for example "helloWorld" will become "Hello World" and "hello-world" will become "Hello world"
|
|
117
|
-
* @param str the string to convert
|
|
118
|
-
* @return the string in kebab case
|
|
119
|
-
*/
|
|
120
|
-
export declare function toSentenceCase(inputStr: string): string;
|
|
121
|
-
/**
|
|
122
|
-
* Converts a string from camelCase to snake_case (underscore) case
|
|
123
|
-
* @param str the string to convert
|
|
124
|
-
* @return the string in kebab case
|
|
125
|
-
*/
|
|
126
|
-
export declare function toSnakeCase(inputStr: string): string;
|
|
127
|
-
/**
|
|
128
|
-
* Takes an input array and makes sure the array has unique values by removing duplicates
|
|
129
|
-
* @param array input with possible duplicates
|
|
130
|
-
* @return array output without duplicates
|
|
131
|
-
*/
|
|
132
|
-
export declare function uniqueArray<T = any>(arr: T[]): T[];
|
|
133
|
-
/**
|
|
134
|
-
* Takes an input array of objects and makes sure the array has unique object values by removing duplicates
|
|
135
|
-
* it will loop through the array using a property name (or "id" when is not provided) to compare uniqueness
|
|
136
|
-
* @param array input with possible duplicates
|
|
137
|
-
* @param propertyName defaults to "id"
|
|
138
|
-
* @return array output without duplicates
|
|
139
|
-
*/
|
|
140
|
-
export declare function uniqueObjectArray(arr: any[], propertyName?: string): any[];
|