@abtnode/util 1.16.19-beta-e6aac665 → 1.16.19-beta-7b2db880

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.
Files changed (2) hide show
  1. package/lib/nft.js +2 -2
  2. package/package.json +6 -6
package/lib/nft.js CHANGED
@@ -3,13 +3,13 @@ const get = require('lodash/get');
3
3
 
4
4
  const getNftExpirationDate = (asset) => last(get(asset, 'data.value.expirationDate', []));
5
5
 
6
+ const isDateExpired = (expirationDate) => !!expirationDate && new Date(expirationDate).getTime() <= Date.now();
7
+
6
8
  const isNFTExpired = (asset) => {
7
9
  const expirationDate = getNftExpirationDate(asset);
8
10
  return isDateExpired(expirationDate);
9
11
  };
10
12
 
11
- const isDateExpired = (expirationDate) => !!expirationDate && new Date(expirationDate).getTime() <= Date.now();
12
-
13
13
  const isNFTConsumed = (asset) => !!asset.data.value.consumedTime;
14
14
 
15
15
  module.exports = { isNFTExpired, getNftExpirationDate, isNFTConsumed };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.19-beta-e6aac665",
6
+ "version": "1.16.19-beta-7b2db880",
7
7
  "description": "ArcBlock's JavaScript utility",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -18,10 +18,10 @@
18
18
  "author": "polunzh <polunzh@gmail.com> (http://github.com/polunzh)",
19
19
  "license": "Apache-2.0",
20
20
  "dependencies": {
21
- "@abtnode/constant": "1.16.19-beta-e6aac665",
22
- "@abtnode/logger": "1.16.19-beta-e6aac665",
23
- "@blocklet/constant": "1.16.19-beta-e6aac665",
24
- "@blocklet/meta": "1.16.19-beta-e6aac665",
21
+ "@abtnode/constant": "1.16.19-beta-7b2db880",
22
+ "@abtnode/logger": "1.16.19-beta-7b2db880",
23
+ "@blocklet/constant": "1.16.19-beta-7b2db880",
24
+ "@blocklet/meta": "1.16.19-beta-7b2db880",
25
25
  "@ocap/client": "1.18.95",
26
26
  "@ocap/mcrypto": "1.18.95",
27
27
  "@ocap/util": "1.18.95",
@@ -76,5 +76,5 @@
76
76
  "fs-extra": "^10.1.0",
77
77
  "jest": "^27.5.1"
78
78
  },
79
- "gitHead": "09b0172831521ef73f7879940b977c2696b5b247"
79
+ "gitHead": "598b576b97dd7accbfa1bb509b75e423ad27e5e2"
80
80
  }