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

dotf

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotf

Dotfile manager

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
decreased by-17.5%
Maintainers
3
Weekly downloads
 
Created
Source

dotf Build Status npm Version

Manage multiple dotfiles.

npm i dotf

Features

  • Supports multiple dotfiles
  • Absolute or relative dotfiles

Example

import dotf from 'dotf';

// Setup dotfiles
let dotglobal = dotf('~', 'myrc'); // Global (~)
let dotlocal = dotf(__dirname, 'myignore'); // Local (./)

// Write
let overwriteGlobal = await dotglobal.write({ myGlobal: 1337 });
let overwriteLocal = await dotlocal.write({ myLocal: 2674 });

// Exists
let globalExists = await dotglobal.exists();
let localExists = await dotlocal.exists();

// Read
let globalRead = await dotglobal.read();
let localRead = await dotlocal.read();

Why not use XXX instead?

  • I didn't see support for custom paths in dotfile in other packages (i.e. /dotfile).
  • This module provides 1 liner read/write/existance with the modern await syntax.

Tests (ava)

npm i
npm test

FAQs

Package last updated on 30 Aug 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