New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-snapshot-parser

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

jest-snapshot-parser

parse jest snapshot content (*.snap file)

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
431
decreased by-13.45%
Maintainers
1
Weekly downloads
 
Created
Source

jest-snapshot-parser

npm build coverage

parse jest snapshot content (*.snap file)

Changelog

Install

# using npm
npm install --save jest-snapshot-parser

# using yarn
yarn add jest-snapshot-parser

Usage

import { readFileSync } from 'fs';
import { parse } from 'jest-snapshot-parser';

const snap_content = readFileSync('path/to/your/snap/file', 'utf8');
parse(snap_content); //=> JSON from *.snap file

NOTE: Only support snapshots that their original values are primitive types.

API

function parse(content: string): { [key: string]: undefined | null | boolean | number | string };

Development

# lint
yarn run lint

# build
yarn run build

# test
yarn run test

License

MIT © Ika

Keywords

FAQs

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

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