New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

json-fn-file

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-fn-file

Apply a function to a json file and save to a file

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

json-fn-file

NPM version Build Status XO code style

Apply a function to a json file and save to a file

Install

npm install --save json-fn-file

Usage

const jsonFnFile = require('json-fn-file');

// Assuming "input.json" contains:
//  {
//    "key1": "Value1",
//    "key2": "Value2"
//  }
jsonFnFile('input.json', 'output.txt', input => Object.keys(input));
//=> 'key1,key2'

API

jsonFnFile(inputFile, outputFile, fn)

Arguments

NameDescriptionTypeDefault
inputFileFile path to input json filestringNone (required)
outputFileFile path to output filestringNone (required)
fnConverter function to run on jsonfunction(in) => (in)

Your function will be fed one argument, the json content of inputFile.

Returns

Type: object

License

MIT © Dawson Botsford

Keywords

dawson

FAQs

Package last updated on 29 Jan 2017

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