Nitrogen Peroxide Monoxide
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


    This package has been deprecated

    Author message:

    no longer maintained


    A caching wrapper for pygmentize-bundled


    The API is exactly the same as pygmentize-bundled, so this is a drop-in replacement but instead of repeatedly calling a child process with Python to run Pygmentize, output will be saved to a cache the first time and served subsequent times.

    There is one API addition: If you provide a cachePath on the options object then you can override the default $HOME/.pygmentize-bundled-cache cache directory. This may be useful in environments where HOME is not set or you want to do something custom with the cache.


    • The cache is located in ~/.pygmentize-bundled-cache and is not cleaned up automatically, heavy use with new code samples will create a large cache, you have been warned!
    • The streaming interface, while still available, is essentially a buffering interface so that the input code can be collected, checked in the cache and the result written back out. Even in the case of a cache-miss the result is still written as a single chunk (the result could be streamed but it's a non-trivial job, pull-requests accepted!).
    • The cache consists of MD5 filenames where the hash is taken of a concatenation of the options object passed in and the original code sample being converted. Therefore, the same code sample passed in with different options will result in multiple cache entries.


    pygmentize-bundled-cached is Copyright (c) 2014 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included file for more details.


    npm i pygmentize-bundled-cached

    Downloadsweekly downloads







    last publish


    • avatar