Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

duke3d-group

1.0.0 • Public • Published

Duke3D Group

NPM version Build Status Coverage Status Known Vulnerabilities Downloads

A module for reading Duke Nukem 3D group files.

Usage

var Group = require("duke3d-group");
 
// creating and writing a group to a file:
var group = new Group("TEST.GRP");
group.addFile(new Group.File("GAME.CON", Buffer.from("define MAXPLAYERHEALTH 420")));
group.addDirectory("C:\\TCs\Awesome_TC\\");
group.writeTo("C:\\TCs\\AWESOME.GRP");
 
// reading, interacting and extracting files with / from a group:
var group = Group.readFrom("C:\\TCs\EPICNUKE.GRP");
console.log("Number of Files: " + group.numberOfFiles());
group.extractAllFiles("C:\\TCs\\EpicNukem\\");
var conFiles = group.getFilesWithExtension("CON");
for(var i = 0; i < conFiles.length; i++) {
    console.log(conFiles[i].name);
}

Installation

To install this module:

npm install duke3d-group

install

npm i duke3d-group

Downloadsweekly downloads

1

version

1.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability