How to use warframe-worldstate-data - 5 common examples

To help you get started, we’ve selected a few warframe-worldstate-data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WFCD / warframe-worldstate-parser / src / modules / voidFissure.js View on Github external
var VoidFissure = function(data) {
  try{
    this.id = data._id.$id;
    this.location = dsUtil.getSolNodeValue(data.Node, nodes);
    this.missionType = dsUtil.getSolNodeType(data.Node, nodes);
    this.voidTier = modifiers[data.Modifier] ? modifiers[data.Modifier].value : data.Modifier;
    this.tierNum = modifiers[data.Modifier] ? modifiers[data.Modifier].num : 0;
    this.enemy =  dsUtil.getSolNodeEnemy(data.Node, nodes);
    if(data.Activation) {
      this.startTime = new Date(1000 * data.Activation.sec);
    }
    if(data.Expiry) {
      this.endTime = new Date(1000 * data.Expiry.sec);
    }
  } catch (err) {
    console.log("Mission: " + err.message);
    console.log(JSON.stringify(data));
  }
}
github WFCD / warframe-worldstate-parser / src / modules / voidFissure.js View on Github external
var VoidFissure = function(data) {
  try{
    this.id = data._id.$id;
    this.location = dsUtil.getSolNodeValue(data.Node, nodes);
    this.missionType = dsUtil.getSolNodeType(data.Node, nodes);
    this.voidTier = modifiers[data.Modifier] ? modifiers[data.Modifier].value : data.Modifier;
    this.tierNum = modifiers[data.Modifier] ? modifiers[data.Modifier].num : 0;
    this.enemy =  dsUtil.getSolNodeEnemy(data.Node, nodes);
    if(data.Activation) {
      this.startTime = new Date(1000 * data.Activation.sec);
    }
    if(data.Expiry) {
      this.endTime = new Date(1000 * data.Expiry.sec);
    }
  } catch (err) {
    console.log("Mission: " + err.message);
    console.log(JSON.stringify(data));
  }
}
github WFCD / warframe-worldstate-parser / src / modules / components.js View on Github external
var md = require('node-md-config');
var jsonQuery = require('json-query');
var componentData =  require('warframe-worldstate-data').components;

var toTitleCase = function (str)
{
    return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}

var RelicSort = function(a, b){
  var aVal = setRelicValForCompare(a);
  var bVal = setRelicValForCompare(b);
  
  if(aValbVal)
    return 1;
github WFCD / warframe-worldstate-parser / src / modules / voidFissure.js View on Github external
var util = require('util');
var md = require('node-md-config');

var dsUtil = require('../lib/_utils.js');
var nodes = require('warframe-worldstate-data').solNodes;
var modifiers = require('warframe-worldstate-data').fissureModifiers;

/**
 * Create a new void fissures list
 * 
 * @constructor
 * @param {object} data VoidFissure data
 */
var VoidFissures = function(data) {
  this.voidFissures = [];
  for (var index = 0; index < data.length; index++){
    this.voidFissures.push(new VoidFissure(data[index]));
  }
  if(this.voidFissures.length > 0){
    this.voidFissures.sort(function(a, b){
      if(a.tierNum > b.tierNum)
        return 1;
github WFCD / warframe-worldstate-parser / lib / WorldState.js View on Github external
'use strict';

const mdConfig = require('node-md-config');
const sortieData = require('warframe-worldstate-data').sortie;

const News = require('./News.js');
const WorldEvent = require('./WorldEvent.js');
const Alert = require('./Alert.js');
const Sortie = require('./Sortie.js');
const SortieVariant = require('./SortieVariant.js');
const SyndicateMission = require('./SyndicateMission.js');
const Fissure = require('./Fissure.js');
const GlobalUpgrade = require('./GlobalUpgrade.js');
const FlashSale = require('./FlashSale.js');
const Invasion = require('./Invasion.js');
const DarkSector = require('./DarkSector.js');
const DarkSectorBattle = require('./DarkSectorBattle.js');
const Mission = require('./Mission.js');
const Reward = require('./Reward.js');
const VoidTrader = require('./VoidTrader.js');

warframe-worldstate-data

Warframe data for use with warframe-worldstate-parser

MIT
Latest version published 1 month ago

Package Health Score

78 / 100
Full package analysis