Commit e96970a0 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Refactoring: `moment` importer

parent e4c739b6
// Source file from duniter: Crypto-currency software to manage libre currency such as Ğ1
// Copyright (C) 2018 Cedric Moreau <cem.moreau@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
import * as moment from "moment"
import {LokiIndex} from "./LokiIndex"
import {TxsDAO} from "../abstract/TxsDAO"
import {SandBox} from "../../sqliteDAL/SandBox"
......@@ -5,7 +19,6 @@ import {TransactionDTO} from "../../../dto/TransactionDTO"
import {DBTx} from "../../../db/DBTx"
import {Underscore} from "../../../common-libs/underscore"
const moment = require('moment')
const constants = require('../../../constants')
export class LokiTransactions extends LokiIndex<DBTx> implements TxsDAO {
......
......@@ -11,8 +11,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
import {IdentityDTO} from "./IdentityDTO"
import * as moment from "moment"
import {IdentityDTO} from "./IdentityDTO"
import {Cloneable} from "./Cloneable";
import {hashf} from "../common";
......
......@@ -11,9 +11,9 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
import * as moment from "moment"
import {Directory} from "./system/directory"
const moment = require('moment');
const path = require('path');
const winston = require('winston');
......
......@@ -11,8 +11,9 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
import {CrawlerConstants} from "./constants"
import * as stream from "stream"
import * as moment from "moment"
import {CrawlerConstants} from "./constants"
import {Server} from "../../../../server"
import {PeerDTO} from "../../../lib/dto/PeerDTO"
import {FileDAL} from "../../../lib/dal/fileDAL"
......@@ -34,7 +35,6 @@ import {Underscore} from "../../../lib/common-libs/underscore"
import {HttpMerkleOfPeers} from "../../bma/lib/dtos"
import {DBPeer, JSONDBPeer} from "../../../lib/db/DBPeer"
const moment = require('moment');
const multimeter = require('multimeter');
const makeQuerablePromise = require('querablep');
......
......@@ -11,6 +11,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
import * as moment from "moment"
import {Server} from "../../../../server"
import {BlockchainContext} from "../../../lib/computation/BlockchainContext"
import {TransactionDTO} from "../../../lib/dto/TransactionDTO"
......@@ -33,7 +34,6 @@ import {Underscore} from "../../../lib/common-libs/underscore"
import {DBCert} from "../../../lib/dal/sqliteDAL/CertDAL"
import {Map} from "../../../lib/common-libs/crypto/map"
const moment = require('moment');
const inquirer = require('inquirer');
const constants = CommonConstants
......
......@@ -11,6 +11,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
import * as moment from "moment"
import {LOCAL_RULES_HELPERS} from "../../../lib/rules/local_rules"
import {hashf} from "../../../lib/common"
import {DBBlock} from "../../../lib/db/DBBlock"
......@@ -23,7 +24,6 @@ import {ProcessCpuProfiler} from "../../../ProcessCpuProfiler"
import {PowDAL} from "../../../lib/dal/fileDALs/PowDAL";
import {Directory} from "../../../lib/system/directory"
const moment = require('moment');
const querablep = require('querablep');
export function createPowWorker() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment