npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

crtf

v1.0.3

Published

A Package which has A Set of methods for newly added file extention .crtf

Readme

crtf

A Playground Library for .crtf Extention

What is CRTF?

CRTF is a file extention for reusing a text file with minor change where one can write a text file along with the few variable which developer can manupulate in time. This library provides an access to read and convert this kind of file into native text or any provided form

Sample .crtf File

Alt text

#output

if object = {
    name : "Piyush",
    date : "29/12/2020",
    description : "Created a file which will update the UI"
}

The output will look like below for above content
OUTPUT:-

/**
 * Created by Piyush on 29/12/2020
 * Created a file which will update the UI
 * Updated by Piyush on 29/12/2020
 * Created a file which will update the UI
*/

Installation

npm install crtf

Features

  • Get the crtf content
  • Replace the crtf content with set of objects
  • Replace and Write to another file with set of objects
  • Get the Variables Associated with crtf

Usage


Creating a CRTF instance

Do not use Contructor for the same

import CRTF from 'crtf';

let crtf;
CRTF.build('path of the crtf file', 'encoding').then(obj => {
    crtf = obj;
    // now crtf is an instance of CRTF
})

or

import CRTF from 'crtf';

let crtf = await CRTF.build('path of the crtf file', 'encoding');

Methods

  • getContent - returns a raw content of the .crtf file
import CRTF from 'crtf';

let crtf = await CRTF.build('path of the crtf file', 'encoding');

let rawContent = crtf.getContent();
  • getVariables - returns a raw variables of the .crtf file
import CRTF from 'crtf';

let crtf = await CRTF.build('path of the crtf file', 'encoding');

let rawContent = crtf.getVariables();
  • replaceContent - returns a replaced content of the .crtf file from given variable objects
import CRTF from 'crtf';

let crtf = await CRTF.build('path of the crtf file', 'encoding');

// for using the sample image above
let obj = {
    name : "Git",
    description : "Git Description"
}

let rawContent = crtf.replaceContent(obj);
  • replaceContentAndWrite - write to file with a replaced content of the .crtf file from given variable objects
import CRTF from 'crtf';

let crtf = await CRTF.build('path of the crtf file', 'encoding');

let writePath = 'your-new-path';

// for using the sample image above
let obj = {
    name : "Git",
    description : "Git Description"
}
let rawContent = crtf.replaceContentAndWrite(writePath, obj);

Hope you like this package. Thanks!

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details