Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@confuzzle/writepuz

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@confuzzle/writepuz

Minimal .puz format writer

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30
decreased by-76.74%
Maintainers
1
Weekly downloads
 
Created
Source

@confuzzle/writepuz

This package is for writing .puz format files. For a full reader, writer, and parser, see @confuzzle/puz-crossword.

Functionality

This package provides a single function writepuz(puz), which takes a puz object (described below) and returns a Uint8Array of its corresponding .puz representation.

const puz = {
   title: "...",
   author: "...",
   copyright: "...",
   note: "...",
   width: 15,
   height: 15,
   clues: ["clue 1", "clue 2", ...],
   solution: "ABC...",
   state: "A--..."
}

All fields have meanings as described by the .puz file format. The state field is optional.

Example Usage

const fs = require('fs');
const readpuz = require('@confuzzle/readpuz').readpuz;
const writepuz = require('@confuzzle/writepuz').writepuz;
const puz = readpuz(fs.readFileSync("test.puz"));
puz.title = "A new title";
const puzbytes = writepuz(puz);
const puz2 = readpuz(puzbytes);
console.log(puz2.title);

Keywords

FAQs

Package last updated on 13 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc