Socket
Book a DemoInstallSign in
Socket

jk-services

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jk-services

A hub of common services for Jike FE.

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

JK-Services

A hub of common services for Jike FE.

Installation

$ npm i -S jk-services

Usage

Schema usage

// Include data type definitions for services
import { MessageSchema } from 'jk-services/lib/schemas'

// Check data type based on static code analysis
const hotMessages: MessageSchema[] = [
  { ...messageItemData }
]

Request usage

// Load the category for tiny bundle
import {
  request,
  fileRequest
} from 'jk-services/lib/requests'

// Generic: Request
const READ_URL = 'https://example.com/api/getSth'
const readQuery = { limit: 20 }
request.get(READ_URL, readQuery)
  .then(res => {
    console.log(res)
  })

// Spec: File request
const file = pickedFile // From imagePicker
fileRequest.uploadFile(file)
  .then(res => {
    const { key, url } = res
    // @To do some great thing...
  })

FAQs

Package last updated on 18 Oct 2017

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