Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loadfxt

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

loadfxt

Javascript library to load fixtures of different formats

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

CI codecov

loadfxt

Tiny JavaScript library to load fixtures of different formats.
Don't know why this isn't included in every testing framework already 🤷

Examples

  1. Binary data
loadfxt('<path/to/fixture>').toArrayBuffer();
  1. Binary string
    Each byte is represented as one character in the resulting string.
loadfxt('<path/to/fixture>').toBinaryString();
  1. UTF-8 string
    The loaded data will be represented in UTF-8 encoding.
loadfxt('<path/to/fixture>').toUtf8();
  1. JSON
loadfxt('<path/to/fixture>').toJson();

Keywords

FAQs

Package last updated on 05 Dec 2020

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