🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

os-paths

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

os-paths - npm Package Compare versions

Comparing version

to
3.0.1

15

index.d.ts

@@ -1,2 +0,3 @@

declare namespace envPaths {
// # spell-checker:ignore rivy
declare namespace osPaths {
export interface Options {

@@ -41,3 +42,3 @@ /**

declare const envPaths: {
declare const osPaths: {
/**

@@ -64,10 +65,10 @@ Get paths for storing things like data, config, cache, etc.

*/
(name: string, options?: envPaths.Options): envPaths.Paths;
(name: string, options?: osPaths.Options): osPaths.Paths;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function envPaths(name: string, options?: envPaths.Options): envPaths.Paths;
// export = envPaths;
default: typeof envPaths;
// declare function osPaths(name: string, options?: osPaths.Options): osPaths.Paths;
// export = osPaths;
default: typeof osPaths;
};
export = envPaths;
export = osPaths;

@@ -0,1 +1,3 @@

// # spell-checker:ignore macos APPDATA LOCALAPPDATA
'use strict';

@@ -9,4 +11,4 @@ const path = require('path');

// #ref: <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html> @@ <https://archive.is/aAhtw>
// #ref: <https://wiki.debian.org/XDGBaseDirectorySpecification#state> @@ <http://archive.is/pahId>
// # ref: <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html> @@ <https://archive.is/aAhtw>
// # ref: <https://wiki.debian.org/XDGBaseDirectorySpecification#state> @@ <http://archive.is/pahId>

@@ -97,3 +99,3 @@ const macos = name => {

const envPaths = (name, options) => {
const osPaths = (name, options) => {
if (typeof name !== 'string') {

@@ -121,4 +123,4 @@ throw new TypeError(`Expected string, got ${typeof name}`);

module.exports = envPaths;
module.exports = osPaths;
// #TODO: Remove this for the next major release
module.exports.default = envPaths;
module.exports.default = osPaths;
{
"name": "os-paths",
"version": "3.0.0",
"version": "3.0.1",
"description": "Generate portable (and XDG-compatible) paths for storing cache, config, data, etc",
"license": "MIT",
"repository": "rivy/os-paths",
"repository": "rivy/js.os-paths",
"author": {

@@ -8,0 +8,0 @@ "name": "Roy Ivy III",

@@ -0,1 +1,8 @@

<!DOCTYPE markdown><!-- markdownlint-disable no-inline-html -->
<meta charset="utf-8" content="text/markdown" lang="en">
<!-- -## editors ## (emacs/sublime) -*- coding: utf8-nix; tab-width: 4; mode: markdown; indent-tabs-mode: nil; basic-offset: 2; st-word_wrap: 'true' -*- ## (jEdit) :tabSize=4:indentSize=4:mode=markdown: ## (notepad++) vim:tabstop=4:syntax=markdown:expandtab:smarttab:softtabstop=2 ## modeline (see <https://archive.is/djTUD>@@<http://webcitation.org/66W3EhCAP> ) -->
<!-- spell-checker:ignore expandtab markdownlint modeline smarttab softtabstop -->
<!-- spell-checker:ignore rivy Sindre Sorhus -->
# os-paths [![Build Status](https://travis-ci.org/rivy/js.os-paths.svg?branch=master)](https://travis-ci.org/rivy/js.os-paths)

@@ -7,10 +14,8 @@

## Install
```shell
npm install os-paths
```
$ npm install os-paths
```
## Usage

@@ -30,6 +35,5 @@

## API
### paths = envPaths(name, [options])
### paths = osPaths(name, [options])

@@ -77,5 +81,4 @@ Note: It only generates the path strings. It doesn't create the directories for you. You could use [`make-dir`](https://github.com/sindresorhus/make-dir) to create the directories.

## License
MIT © Roy Ivy III, [Sindre Sorhus](https://sindresorhus.com)