Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Files

Latest commit

2c97cb0 · Feb 7, 2018

History

History
58 lines (42 loc) · 2.44 KB

README.md

File metadata and controls

58 lines (42 loc) · 2.44 KB

Hashflags

npm Build Status dependencies Status devDependencies Status Coverage Status Maintainability MIT license FOSSA Status semantic-release Commitizen friendly Dependabot badge Known Vulnerabilities

A library for using Twitter hashflags in the browser and Node.js

Installation

Using npm:

npm install hashflags

Examples

Importing and initialising Hashflags in TypeScript

import { Hashflags } from 'hashflags';

let hf: Hashflags;
Hashflags.FETCH().then((val: Map<string, string>) => {
    hf = new Hashflags(val);
    console.log(hf.activeHashflags);
});

Importing and initialising Hashflags in JavaScript

const Hashflags = require('hashflags').Hashflags;

let hf;
Hashflags.FETCH().then((val) => {
    hf = new Hashflags(val);
    console.log(hf.activeHashflags);
});

Credits

If you like this follow @Jamie_Magee on Twitter.

License

MIT