npm.io
0.2.0 • Published 9 years ago

is-json-file

Licence
MIT
Version
0.2.0
Deps
0
Vulns
0
Weekly
0

is-json-file

[![npm Version][NPM VERSION BADGE]][NPM PAGE] [![GitHub License][LICENSE BADGE]][LICENSE PAGE] Build Status

Determine if a resource is a JSON file.

Install

You can install this module via the following command.

$ npm install --save is-json-file

Usage

const isJsonFile = require('is-json-file');

let filename = 'taco-tuesday.json';

isJsonFile(filename); // > true

let notJson = 'laser-giraffe.txt';

isJsonFile(notJson); // > false

Testing

$ npm test

License

This project is licensed under the terms of the MIT License (Expat). You can view the full license here.

[LICENSE BADGE]: https://img.shields.io/github/license/jbenner-radham/is-json-file.svg?style=flat-square [LICENSE PAGE]: https://github.com/jbenner-radham/is-json-file/blob/master/LICENSE [NPM PAGE]: https://www.npmjs.com/package/is-json-file [NPM VERSION BADGE]: https://img.shields.io/npm/v/is-json-file.svg?style=flat-square

Keywords