
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
virtual-file
Advanced tools
[![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][dow
A virtual file abstraction for. This is meant to be used as the file abstraction for normalize.
Goals:
Current limitations:
<script>s) are currently not supported.
Need to figure out a mechanism for those types of files.Creates a new file abstraction based on a URI.
A URI could have #s or ?s.
However, the file must be a local file.
If it's a remote file, download it first.
.filename - the filename of the file.
Unlike the URI, this property is dynamic and removes any #s and ?s in the name..dirname - the folder this file is located..basename - the basename of this file.
This property is dynamic, meaning you can set it, and the filename will be updated automatically..type - the current mime type of the file.
Set the current mime type of the file to keep track of the current transformations..exists - whether the file exists, defaulting to true..sourcemap - whether source maps are enabled, defaulting to true..static - whether this file changes over time (i.e. for a watching instance),
defaulting to false. Set this to true in production when you know
files aren't going to change.Check fs.stat() the file and get the sha256 sum of the file.
Adds the following properties:
.length - the byte length of the file.mtime - the modified time of the file as a Date..hash - the sha256 sum of the file as a Buffer.You should run this before running anything else.
Get the current contents of the file as a string.
Also sets it as .string.
If the string contains an inline source map, it will be removed and moved to .map.
Set a string as the current contents of the file after a transformation.
If the string contains an inline source map, it will be removed and moved to .map.
Get the current source map of the file, if any.
Set the source map of the file.
This should be set before file.string=.
If a previous source map exists, it will be applied to the newest source map.
Otherwise, the current string and .basename will be set as the source.
Check whether the file is stale.
If it is stale, then a new file object will be returned.
Being using the new file object instead of this one.
The file is stale if any of the following is true:
FAQs
[![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][dow
We found that virtual-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.