https://github.com/jbenner-radham/is-json-file
Determine if a resource is a JSON file.
https://github.com/jbenner-radham/is-json-file
file filename filter json
Last synced: 7 months ago
JSON representation
Determine if a resource is a JSON file.
- Host: GitHub
- URL: https://github.com/jbenner-radham/is-json-file
- Owner: jbenner-radham
- License: mit
- Created: 2017-03-05T02:05:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-05T16:58:13.000Z (over 8 years ago)
- Last Synced: 2025-02-22T23:34:15.432Z (8 months ago)
- Topics: file, filename, filter, json
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
is-json-file
============
[![npm Version][NPM VERSION BADGE]][NPM PAGE]
[![GitHub License][LICENSE BADGE]][LICENSE PAGE]
[![Build Status][BUILD BADGE]][BUILD PAGE]Determine if a resource is a JSON file.
Install
-------
You can install this module via the following command.```sh
$ npm install --save is-json-file
```Usage
-----
```js
const isJsonFile = require('is-json-file');let filename = 'taco-tuesday.json';
isJsonFile(filename); // > true
let notJson = 'laser-giraffe.txt';
isJsonFile(notJson); // > false
```Testing
-------
```sh
$ npm test
```License
-------
This project is licensed under the terms of the [MIT License (Expat)](https://tldrlegal.com/l/mit). You can view the full license [here](LICENSE).[BUILD BADGE]: https://img.shields.io/travis/jbenner-radham/is-json-file.svg?style=flat-square
[BUILD PAGE]: https://travis-ci.org/jbenner-radham/is-json-file
[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