�PNG  IHDR��;���IDATx��ܻn�0���K�� �)(�pA��� ���7�LeG{�� �§㻢|��ذaÆ 6lذaÆ 6lذaÆ 6lom��$^�y���ذag�5bÆ 6lذaÆ 6lذa{���� 6lذaÆ �`����}H�Fkm�,�m����Ӫ���ô�ô!� �x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6� �h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t ��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ ��Rn��~G���R���C����� �wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L�� lذaÆ 6l�^k��̱aÆ 6lذaÆ 6lذa;���� �_��ذaÆ 6lذaÆ 6lذaÆ ���R���IEND�B` # `patchRequire(vol[, unixifyPaths[, Module]])` Patches Node's `module` module to use a given *fs-like* object `vol` for module loading. - `vol` - fs-like object - `unixifyPaths` *(optional)* - whether to convert Windows paths to unix style paths, defaults to `false`. - `Module` *(optional)* - a module to patch, defaults to `require('module')` Monkey-patches the `require` function in Node, this way you can make Node.js to *require* modules from your custom filesystem. It expects an object with three filesystem methods implemented that are needed for the `require` function to work. ```js let vol = { readFileSync: () => {}, realpathSync: () => {}, statSync: () => {}, }; ``` If you want to make Node.js to *require* your files from memory, you don't need to implement those functions yourself, just use the [`memfs`](https://github.com/streamich/memfs) package: ```js import {vol} from 'memfs'; import {patchRequire} from 'fs-monkey'; vol.fromJSON({'/foo/bar.js': 'console.log("obi trice");'}); patchRequire(vol); require('/foo/bar'); // obi trice ``` Now the `require` function will only load the files from the `vol` file system, but not from the actual filesystem on the disk. If you want the `require` function to load modules from both file systems, use the [`unionfs`](https://github.com/streamich/unionfs) package to combine both filesystems into a union: ```js import {vol} from 'memfs'; import {patchRequire} from 'fs-monkey'; import {ufs} from 'unionfs'; import * as fs from 'fs'; vol.fromJSON({'/foo/bar.js': 'console.log("obi trice");'}); ufs .use(vol) .use(fs); patchRequire(ufs); require('/foo/bar.js'); // obi trice ```