Socket
Book a DemoInstallSign in
Socket

unilink1

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unilink1

## Example: Server.js

1.0.7
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

UniLink1

Example: Server.js

( async ()=> {

	const process = require( "process" );
	const path = require( "path" );
	const Unilink1 = require( "unilink1" );

	const link = new Unilink1();
	await link.connect();

	await link.database.updateChildReference( "process-1/client-1/channel-1" , "status" , {
		time_string: link.utils.generic.timeString() ,
		time: new Date() ,
		message: "latest status message on channel 1"
	});

	await link.bucket.upload( path.join( __dirname , "PikaO2x.png" ) , "PikaO2x.png" );

	await link.firestore.add( "test-collection-1" , {
		something: "blah blah" ,
		else: "1246" ,
	});

	await link.firestore.set( "test-collection-1" , "PikaO" , {
		activated: false ,
		yesterday: true
	});

	const docs = await link.firestore.getAllDocuments( "test-collection-1" );
	console.log( docs );

	const query_docs = await link.firestore.queryCollectionForDocuments( "test-collection-1" , "activated" , "==" , true );
	console.log( query_docs );

	await link.firestore.deleteAllDcoumentsInCollection( "test-collection-1" );

	process.exit( 1 );

})();

Example: Client.js

( async ()=> {

	const process = require( "process" );
	const path = require( "path" );
	const Unilink1 = require( "unilink1" );

	const link = new Unilink1();
	await link.connect();

	await link.database.updateChildReference( "process-1/client-2/channel-2" , "status" , {
		time_string: link.utils.generic.timeString() ,
		message: "latest status message on channel 2"
	});

	link.firestore.observeDocument( "test-collection-1" , "PikaO" , ( snapshot )=> {
		console.log( "\n/test-collection-1/PikaO/" + " Was Updated" );
		console.log( snapshot.data() );
	});

	await link.bucket.download( "process-1/PikaO2x.png" , path.join( __dirname , "COPY-PikaO2x.png" ) );

	//process.exit( 1 );

})();

FAQs

Package last updated on 10 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.