New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

meme3

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meme3

Popcateum JavaScript API wrapper repository

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

meme3.js

meme3.js - Popcateum JavaScript API

NPM Package Version NPM Package Downloads

This is the Popcateum JavaScript API which connects to the Generic JSON-RPC spec.

Please read the documentation for more.

Installation

Node

npm install meme3

Yarn

yarn add meme3

In the Browser

Use the prebuilt dist/meme3.min.js, or build using the meme3.js repository:

npm run build

Then include dist/meme3.min.js in your html file. This will expose Meme3 on the window object.

Usage

// In Node.js
const Meme3 = require('meme3');

let meme3 = new Meme3('ws://localhost:9507');
console.log(meme3);
> {
    pop: ... ,
    shh: ... ,
    utils: ...,
    ...
}

Additionally you can set a provider using meme3.setProvider() (e.g. WebsocketProvider):

meme3.setProvider('ws://localhost:9507');
// or
meme3.setProvider(new Meme3.providers.WebsocketProvider('ws://localhost:9507'));

There you go, now you can use it:

meme3.pop.getAccounts().then(console.log);

Usage with TypeScript

We support types within the repo itself. Please open an issue here if you find any wrong types.

You can use meme3.js as follows:

import Meme3 from 'meme3';
const meme3 = new Meme3('ws://localhost:9507');

If you are using the types in a commonjs module, like in a Node app, you just have to enable esModuleInterop and allowSyntheticDefaultImports in your tsconfig for typesystem compatibility:

"compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    ....

Trouble shooting and known issues.

Meme3 and Angular

If you are using Ionic/Angular at a version >5 you may run into a build error in which modules crypto and stream are undefined

a work around for this is to go into your node-modules and at /angular-cli-files/models/webpack-configs/browser.js change the node: false to node: {crypto: true, stream: true} as mentioned here

Another variation of this problem was an issue opned on angular-cli: https://github.com/angular/angular-cli/issues/1548

Documentation

Documentation can be found at ReadTheDocs.

Building

Requirements

  • Node.js
  • npm
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

Building (webpack)

Build the meme3.js package:

npm run build

Testing (mocha)

npm test

Contributing

Please follow the Contribution Guidelines and Review Guidelines.

This project adheres to the Release Guidelines.

Community

Similar libraries in other languages

Semantic versioning

This project follows semver as closely as possible from version 1.3.0 onwards. Earlier minor version bumps might have included breaking behavior changes.

Keywords

Popcateum

FAQs

Package last updated on 17 May 2021

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