aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2013-11-28 13:15:01 +0200
committerMihai Bazon <mihai@bazon.net>2013-11-28 13:15:01 +0200
commitc16d538ce7879af6077be3baf4ada87477c4354b (patch)
tree6ffb1f7608ae9c7bd9c35f1754dbe839cb3914ec /lib
parent73d082df2e22e44257b333961f20b2a5a81a934c (diff)
downloadtracifyjs-c16d538ce7879af6077be3baf4ada87477c4354b.tar.gz
tracifyjs-c16d538ce7879af6077be3baf4ada87477c4354b.zip
Add --noerr to turn off argument name checking
for now only used for keys passed to `-c` or `-b`.
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 73964a09..fa24663c 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -86,12 +86,16 @@ function DefaultsError(msg, defs) {
this.defs = defs;
};
+DefaultsError.croak = function(msg, defs) {
+ throw new DefaultsError(msg, defs);
+};
+
function defaults(args, defs, croak) {
if (args === true)
args = {};
var ret = args || {};
if (croak) for (var i in ret) if (ret.hasOwnProperty(i) && !defs.hasOwnProperty(i))
- throw new DefaultsError("`" + i + "` is not a supported option", defs);
+ DefaultsError.croak("`" + i + "` is not a supported option", defs);
for (var i in defs) if (defs.hasOwnProperty(i)) {
ret[i] = (args && args.hasOwnProperty(i)) ? args[i] : defs[i];
}
Inherit from rust-embed-resource-2. Change-Id: Iee1cbaeda0df558d4b19c00094b13405aabf7fb8 Efraim Flashner 2024-02-20gnu: rust-clipboard-win-4: Update to 4.5.0....* gnu/packages/crates-windows.scm (rust-clipboard-win-4): Update to 4.5.0. [arguments]: Don't skip the build. Skip the tests. Change-Id: I615014409d9f994b513a52f19874bd22cb3c703f Efraim Flashner 2024-02-20gnu: Add rust-cargo-credential-wincred-0.4....* gnu/packages/crates-windows.scm (rust-cargo-credential-wincred-0.4): New variable. (rust-cargo-credential-wincred-0.3): Inherit from rust-cargo-credential-wincred-0.4. Change-Id: Ia24b1f84f4ed06750963b225b1bd98063981e3a6 Efraim Flashner 2024-02-20gnu: rust-ws2-32-sys-0.2: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-ws2-32-sys-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I468228276166fc03c53baf00b2d7c480bfb2b121 Efraim Flashner 2024-02-20gnu: rust-wio-0.12: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-wio-0.120: Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I8b53eb6a54d3cced633639ea09731f7ba835926d Efraim Flashner 2024-02-20gnu: rust-wio-0.2: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-wio-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I929b0208dcdf12a06a7986e9eba8831e5a90758c Efraim Flashner 2024-02-20gnu: rust-winutil-0.1: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-winutil-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I5bc5faf1ad6c6c71d975a744255a4601b0ae466d Efraim Flashner 2024-02-20gnu: rust-winres-0.1: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-winres-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Ic5fc23f3d3559469f487969961a5aedc5609ad0e Efraim Flashner 2024-02-20gnu: rust-winreg: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-winreg-0.50, rust-winreg-0.10, rust-winreg-0.8, rust-winreg-0.7, rust-winreg-0.6, rust-winreg-0.5): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I6f5fe23957b0d3b2fd36f7304f64b182f2fd925e Efraim Flashner 2024-02-20gnu: rust-wincolor: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-wincolor-1, rust-wincolor-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I08b132c77005da87116330d9e9b019d233505c7f Efraim Flashner 2024-02-20gnu: rust-winapi: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-winapi-0.3, rust-winapi-0.2, rust-winapi-build-0.1, rust-winapi-i686-pc-windows-gnu-0.4, rust-winapi-util-0.1, rust-winapi-wsapoll-0.1, rust-winapi-x86-64-pc-windows-gnu-0.4): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Ida3a2a0cdae7f823c11c3b4a6d0dd36a158ec021 Efraim Flashner 2024-02-20gnu: rust-win-crypto-ng-0.5: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-win-crypto-ng-0.5): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I78b4e9c93f3ed76b8305113c424028434b62a2da Efraim Flashner 2024-02-20gnu: rust-user32-sys-0.2: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-user32-sys-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Ibb805a990170200cbcb21c0b42aa90a6c04f3be2 Efraim Flashner 2024-02-20gnu: rust-uds-windows: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-uds-windows-1, rust-uds-windows-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I1a3601922dd222d315cba462742678c1286cba4f Efraim Flashner 2024-02-20gnu: rust-serde-ini-0.2: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-serde-ini-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I995da190bbc23fd3dcd64c9b73858290eca0ee03 Efraim Flashner 2024-02-20gnu: rust-schannel-0.1: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-schannel-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: If83411c1a155d69fc92953900231e02da3d7443a Efraim Flashner 2024-02-20gnu: rust-remove-dir-all: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-remove-dir-all-0.5, rust-remove-dir-all-0.8): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I37c560a330a51722401ec325c8a262782c8d3fce Efraim Flashner 2024-02-20gnu: rust-python3-dll-a-0.2: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-python3-dll-a-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Ic16735b24b0a6e37cee0992d0baf130fe9ac4576 Efraim Flashner 2024-02-20gnu: rust-output-vt100-0.1: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-output-vt100-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I4dc63c5e0651c15a34e0f6018619b639f164ba35 Efraim Flashner 2024-02-20gnu: rust-miow: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-miow-0.6, rust-miow-0.5, rust-miow-0.4, rust-miow-0.3, rust-miow-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I663b33b5c50d20505a0ac3997aa2b0038452c8b5 Efraim Flashner 2024-02-20gnu: rust-kernel32-sys-0.2: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-kernel32-sys-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I2b2e3078836618dddf7c332848cb67eee3bd171f Efraim Flashner 2024-02-20gnu: rust-ipconfig: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-ipconfig-0.3, rust-ipconfig-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Ic4e968f6a7bc22cf92646e75f451de03e76112ed Efraim Flashner 2024-02-20gnu: rust-gdi32-sys-0.2: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-gdi32-sys-0.2): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I66940bd81c50c04f928e110a2b81cfe594ca107f Efraim Flashner 2024-02-20gnu: rust-embed-resource-1: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-embed-resource-1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Icabdde1d670e07c6d8e1b8050fd9cf8cf6330faf Efraim Flashner 2024-02-20gnu: rust-dunce-1: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-dunce-1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I230d2476df38f735cb20a4b375befa6e9ae94509 Efraim Flashner 2024-02-20gnu: rust-codepage-0.1: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-codepage-0.1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Icc05b2fb4c8caa08e3c7620270164638e2242517 Efraim Flashner 2024-02-20gnu: rust-clipboard-win: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-clipboard-win-4, rust-clipboard-win-3): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I72c54d9458a335dc053ca204b2382394b5e2c5c1 Efraim Flashner 2024-02-20gnu: rust-conpty-0.5: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-conpty-0.5): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Ief3f25ed5eb8cfcaaf2a78445f24e17fe2f8a4b2 Efraim Flashner 2024-02-20gnu: rust-cargo-credential-wincred-0.3: Move to crates-windows.scm....* gnu/packages/crates-io.scm (rust-cargo-credential-wincred-0.3): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I391de6891c92f5e99fea200ac2ed0b4823409d95 Efraim Flashner 2024-02-20gnu: rust-anstyle-wincon: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-anstyle-wincon-3, rust-anstyle-wincon-1): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I51d7823806cc4e17bb51ad8d9ba29c96aaf4c151 Efraim Flashner 2024-02-20gnu: rust-windows: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-windows-0.48, rust-windows-0.46, rust-windows-0.44, rust-windows-0.39, rust-windows-0.32, rust-windows-0.9, rust-windows-aarch64-gnullvm-0.52, rust-windows-aarch64-gnullvm-0.48, rust-windows-aarch64-gnullvm-0.42, rust-windows-aarch64-msvc-0.52, rust-windows-aarch64-msvc-0.48, rust-windows-aarch64-msvc-0.42, rust-windows-aarch64-msvc-0.39, rust-windows-aarch64-msvc-0.36, rust-windows-aarch64-msvc-0.32, rust-windows-aarch64-msvc-0.28, rust-windows-bindgen-0.51, rust-windows-i686-gnu-0.52, rust-windows-i686-gnu-0.48, rust-windows-i686-gnu-0.42, rust-windows-i686-gnu-0.36, rust-windows-i686-gnu-0.32, rust-windows-i686-gnu-0.28, rust-windows-i686-msvc-0.52, rust-windows-i686-msvc-0.48, rust-windows-i686-msvc-0.42, rust-windows-i686-msvc-0.39, rust-windows-i686-msvc-0.36, rust-windows-i686-msvc-0.32, rust-windows-i686-msvc-0.28, rust-windows-implement-0.48, rust-windows-implement-0.46, rust-windows-implement-0.44, rust-windows-implement-0.39, rust-windows-implement-0.32, rust-windows-interface-0.48, rust-windows-interface-0.46, rust-windows-interface-0.44, rust-windows-interface-0.39, rust-windows-metadata-0.51, rust-windows-sys-0.52, rust-windows-sys-0.48, rust-windows-sys-0.45, rust-windows-sys-0.42, rust-windows-sys-0.36, rust-windows-sys-0.28, rust-windows-gen-0.9, rust-windows-macros-0.9, rust-windows-targets-0.52, rust-windows-targets-0.48, rust-windows-targets-0.42, rust-windows-targets-0.39, rust-windows-targets-0.32, rust-windows-x86-64-gnu-0.52, rust-windows-x86-64-gnu-0.48, rust-windows-x86-64-gnu-0.42, rust-windows-x86-64-gnu-0.39, rust-windows-x86-64-gnu-0.36, rust-windows-x86-64-gnu-0.32, rust-windows-x86-64-gnu-0.28, rust-windows-x86-64-gnullvm-0.52, rust-windows-x86-64-gnullvm-48, rust-windows-x86-64-gnullvm-0.42, rust-windows-x86-64-msvc-0.52, rust-windows-x86-64-msvc-0.48, rust-windows-x86-64-msvc-0.42, rust-windows-x86-64-msvc-0.39, rust-windows-x86-64-msvc-0.36, rust-windows-x86-64-msvc-0.32, rust-windows-x86-64-msvc-0.28): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: I5abaa9402ae75199d4ec26b1e37b3a7293437c93 Efraim Flashner