npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fregistry

v1.0.0

Published

Fast windows registry editor

Downloads

5

Readme

fregistry NPM version

Fast windows registry editor.

Description

This module will allow you to quickly manipulate the reg.exe utility using an intuitive interface. There are also export and import functions.

Table of Contents

Install

$ npm install fregistry

Usage


const fRegistry = require("fregistry");
//as example
const $async = require("async");

fRegistry.to("HKLM");

$async.waterfall([

	next => fRegistry.createSections(["SOFTWARE\\TestSection1", "SOFTWARE\\TestSection2"], error => {

		if(error) return next(error);
		
		next(null);

	}),

	next => fRegistry.createValues("SOFTWARE\\TestSection1", {

		key: "value",
		key2: { value: 123, type: "REG_DWORD" },

	}, error => {

		if(error) return next(error);
		
		next(null);

	}),
	
	next => fRegistry.readValuesAndSections("SOFTWARE\\TestSection1", (error, result) => {

		if(error) return next(error);
		
		if(result.root.key.value) next(null);

	}),
	
	next => fRegistry.exportValuesAndSections("SOFTWARE\\TestSection1", "./exports", error => {
	
		if(error) return next(error);
		
		next(null);
	
	}),
	
	next => fRegistry.removeValues("SOFTWARE\\TestSection1", ["key", "key2"], error => {
	
		if(error) return next(error);
		
		next(null);
	
	}),
	
	next => fRegistry.removeSections(["SOFTWARE\\TestSection1", "SOFTWARE\\TestSection2"], error => {
	
		if(error) return next(error);
		
		next(null);
	
	}),
	
	next => fRegistry.importValuesAndSections("SOFTWARE\\TestSection1", "./exports", error => {
	
		if(error) return next(error);
		
		next(null);
	
	}),
	
], error => { 

	console.error(error);

});

API

Types: HERE!

fRegistry.to(arg: HTypeWithReductions) => typeof fRegistry

Allows you to set a prefix for the main path. It can only take the values described in HTypeWithReductions.

fRegistry.customTo(arg: string) => typeof fRegistry

The same as fRegistry.to, only it can take any string argument.

fRegistry.resetTo() => typeof fRegistry

Clears the path prefix.

fRegistry.exec(shellCmdString: string, cb: (error: execError, result: any) => void) => null

The system method for executing a reg request.

fRegistry.setMaxBuffer(newValue: number) => typeof fRegistry

Sets the specified maximum buffer for stdout of fRegistry.exec .

fRegistry.setRussiaEncoding() => typeof fRegistry

Sets the Russian encoding of the command result via fRegistry.exec .

fRegistry.setChineEncoding() => typeof fRegistry

Sets the Chinese encoding of the command result via fRegistry.exec .

fRegistry.setCustomEncoding() => typeof fRegistry

Allows you to set your own encoding.

fRegistry.readValuesAndSections(path: string, cb: (error: execError, result: plainObjectT) => void, type?: boolean) => null

Returns by callback a list of values and sections in an object.

fRegistry.exportValuesAndSections(path: string, backupPath: string, cb: (error: Error) => void) => null

Exports all values and sections to the given path.

fRegistry.importValuesAndSections(path: string, backupPath: string, cb: (error: Error) => void) => null

Imports all values and sections to the given path.

fRegistry.removeSection(path: string, cb: (error: execError, result: any) => void) => null

Deletes one specified section.

fRegistry.removeSections(paths: string[], cb: (error: pathResultErrorI) => void) => null

Deletes one or more specified sections.

fRegistry.removeValue(path: string, valueName: string, cb: (error: execError, result: any) => void) => null

Removes one value in one section.

fRegistry.removeValues(path: string, valueNames: string[], cb: (error: pathResultErrorI) => void) => null

Removes one or more values in one section.

fRegistry.createSection(path: string, cb: (error: execError, result: any) => void) => null

Creates one section.

fRegistry.createSections(paths: string[], cb: (error: pathResultErrorI) => void) => null

Creates one or more sections.

fRegistry.createValue(path: string, key: string, value: string, cb: (error: execError, result: any) => void, type?: RegEditType) => null

Creates one value in one section.

fRegistry.setDefaultType(newValue: RegEditType) => null

Sets the default value for the type to be used in fRegistry.createValue. Initially equal to REG_SZ.

fRegistry.createValues(path: string, keyAndValues: keyAndValuesI, cb: (error: pathResultErrorI) => void) => null

Creates one or more values in one section.

Contacts

Yandex Mail - [email protected]

Github - https://github.com/StormExecute/

Platforms

Github - https://github.com/StormExecute/fregistry/

NPM - https://www.npmjs.com/package/fregistry/

License

MIT - https://mit-license.org/