1.0.3 • Published 4 years ago

safenote v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

securenote

A npm package to create secure notes, utilising https://safenote.co/

Setup

Requiring

    const { note } = require('securenote');

Parameters

    await note("message", "password", lifeTime, readCount);

    // message - string - Contents of the note. Required.
    // password - string - Password to access. null for no password
    // lifeTime - integer - How many hours until the note is deleted; 1 - 336. Default 1.
    // readCount - integer - How many times the note can be read; minimum 1. Default 1.

Examples

Default

    async function example() {

        response = await note("Super secure note");

        let note1 = response.note;
        let password = response.password;
        let key = response.key;
        let link = response.link;
        let lifeTime = response.life_time;
        let readCount = response.read_count;

        console.log(link);
    }

    example();

Password

    async function example() {

        response = await note("Super secure note", "Password123", 1, 1);

        let note1 = response.note;
        let password = response.password;
        let key = response.key;
        let link = response.link;
        let lifeTime = response.life_time;
        let readCount = response.read_count;

        console.log(link);
    }

    example();

Expires in 2 hours

    async function example() {

        response = await note("Super secure note", null, 2, 1);

        let note1 = response.note;
        let password = response.password;
        let key = response.key;
        let link = response.link;
        let lifeTime = response.life_time;
        let readCount = response.read_count;

        console.log(link);
    }

    example();

Maximum 5 reads

    async function example() {

        response = await note("Super secure note", null, 1, 5);

        let note1 = response.note;
        let password = response.password;
        let key = response.key;
        let link = response.link;
        let lifeTime = response.life_time;
        let readCount = response.read_count;

        console.log(link);
    }

    example();
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago