From patchwork Mon Dec 13 06:00:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 35190 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AAB2D27BBEC; Mon, 13 Dec 2021 06:08:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 36D4627BBEA for ; Mon, 13 Dec 2021 06:08:29 +0000 (GMT) Received: from localhost ([::1]:47970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mweVg-00071Q-9A for patchwork@mira.cbaines.net; Mon, 13 Dec 2021 01:08:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mweST-0003g1-A6 for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42279) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mweSS-0007aI-6O for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mweSS-0002eR-0r for guix-patches@gnu.org; Mon, 13 Dec 2021 01:05:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v4 33/45] gnu: Add node-ms. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Dec 2021 06:05:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51838@debbugs.gnu.org Cc: Timothy Sample , Pierre Langlois , Jelle Licht , Philip McGrath , Liliana Marie Prikler Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163937550010055 (code B ref 51838); Mon, 13 Dec 2021 06:05:07 +0000 Received: (at 51838) by debbugs.gnu.org; 13 Dec 2021 06:05:00 +0000 Received: from localhost ([127.0.0.1]:53807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mweSJ-0002c1-KR for submit@debbugs.gnu.org; Mon, 13 Dec 2021 01:05:00 -0500 Received: from mail-ua1-f49.google.com ([209.85.222.49]:43752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mweRz-0002Zv-V1 for 51838@debbugs.gnu.org; Mon, 13 Dec 2021 01:04:55 -0500 Received: by mail-ua1-f49.google.com with SMTP id n9so8334876uaq.10 for <51838@debbugs.gnu.org>; Sun, 12 Dec 2021 22:04:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Po03U5hKCH+O6vSfkBqyiv3/aJnr/Byyr90CAG35pOk=; b=g6zEU6YG2jZhjyAhP1bK5Kg9Q/Cn0o9cp7L8bDkUyv4uM9wqUNJ0My5Glr7vpbayz7 Wr3EAfIbyF7fMcxZ80U6lR8M415VgcJgeGbEh3Bt9stWlUB+6rsQteFtsQQjfmsYSEae jUQNB6yxJqfRSPN9dSr9cxN0laxr++YohQ6ZOzm9nAuPgTE8n1m86rfIsK/zBGoBwS0k eDZ5nl+TC/YFmc5NzW+zu5dFZxbdylRzJTKEQ35FYUo6M1sznVKe2j9DySkrPLB1EIP1 nmuTyaC2SQCnOTIig0Dhim+PHLVsRE5DVTHHQ1aY4wg89139n0nrfVoTvAflJfZjBLce I74A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Po03U5hKCH+O6vSfkBqyiv3/aJnr/Byyr90CAG35pOk=; b=IthYs3VbHfE4KEHD5E0IWAgwGDFEKjcRlaWF0DsqkJvA8TIVHo17TO/sSXoA+yFkH0 aQfMKvja30XSRqwgpcgOVrP2Kjy5E3NCFnTxZP8Uzmc6wEEYygfHbEc3AobrufH2Uv4C JdPwEkoAAxMJ1rsgcjK8l70B9mV7ZLQY1ebtFyUFf4Ab9/eMKrFxbxaaCK43S3ir/eJH 0SfFP/rw8pGRX9vf4QvNoqB9P/4PalmpciTtJHNFTvCqrANidRZe80ZFTCs48koV93l+ Msjjl4o2/8mV5DIomi+j8ht6pYhVy+WBhBa5n3+QGGSi2iWnG2rCkcu3N8+wSjmOQtHv mD4w== X-Gm-Message-State: AOAM530Ty/O+HNK9XNQwH3hhqSMWy9ITQghaAmj9irEuO9K/gh7Lon5e /Ww1IJd06X+jUcE+VB7ubWg9+jCFULwKFl13RjQ= X-Google-Smtp-Source: ABdhPJx3C5VhVgp5eRvktD56GvzfijZnqu1R6Z9tLUzq7RwY9PGAxSmpjtCVar5AUQqPQpXpDcUe8Q== X-Received: by 2002:a67:fa12:: with SMTP id i18mr25098637vsq.49.1639375474601; Sun, 12 Dec 2021 22:04:34 -0800 (PST) Received: from localhost (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id i7sm3721139vkh.24.2021.12.12.22.04.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 22:04:34 -0800 (PST) From: Philip McGrath Date: Mon, 13 Dec 2021 01:00:55 -0500 Message-Id: <20211213060107.129223-34-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211213060107.129223-1-philip@philipmcgrath.com> References: <46a042bc08eb72a068b1e8c69bfe28cf2d4b2e53.camel@gmail.com> <20211208202838.752542-1-philip@philipmcgrath.com> <20211208202838.752542-5-philip@philipmcgrath.com> <877dc924h7.fsf@gmx.com> <5c62c3ce-dd50-5dcd-00ed-ff1524be4e0b@philipmcgrath.com> <20211213060107.129223-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node-xyz.scm (node-ms): New variable. --- gnu/packages/node-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index b63cd46fdd..82ac537133 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -898,3 +898,46 @@ (define-public node-segfault-handler @code{SIGSEGV} signal is raised, the module will print a native stack trace to both @code{STDERR} and to a timestamped file.") (license license:bsd-3))) + +(define-public node-ms + (package + (name "node-ms") + (version "2.1.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vercel/ms") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1l74kmmwffmzdz38lli0v5mdb9p9jmsjxpb48ncknqw2n74cgf08")))) + (build-system node-build-system) + (arguments + `(#:absent-dependencies + `("eslint" + "expect.js" + "husky" + "lint-staged" + "mocha" + "prettier") + #:tests? #f)) + (home-page "https://github.com/vercel/ms") + (synopsis "Tiny millisecond conversion utility") + (description "Use this package to easily convert various time formats to +milliseconds. + +Features: +@itemize @bullet +@item +Works both in Node.js and in the browser. +@item +If a number is supplied to @code{ms}, a string with a unit is returned. +@item +If a string that contains the number is supplied, it returns it as a +number (e.g. it returns @code{100} for @code{'100'}). +@item +If you pass a string with a number and a valid unit, the number of +equivalent milliseconds is returned. +@end itemize") + (license license:expat)))