New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

sp-fe-func

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

sp-fe-func

Common Function for Dev

unpublished
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

sp-fe-func

Common Function for Dev.

Install

NPM

npm install --save sp-fe-func
// or yarn add sp-fe-func

CDN

<script src="https://unpkg.com/sp-fe-func/index.min.js"></script>
<script>
  __FUNC.serviceAPI(options = {
    url: '/',
    method: 'get',
    data: {},
    success: function () {},
    fail: function () {},
    headers: {}
  });
  __FUNC.serviceAPI({url: 'http://test.com/test.json'})
</script>

Usage

 //__FUNC: {serviceAPI}
const __FUNC = require('sp-fe-func')

API Request

Based on axios.

  • serviceAPI (options = {})
    • options
      • [url]: /
      • [method]: get, post
      • [data]: {keyword: 'test'}
      • [success]: function (res) { console.log(res) }
      • [fail]: function (err) { console.log(err) }
  __FUNC.serviceAPI({
    url: 'http://test.com/test.json',
    success: (res) => {
      console.log(res)
    }
  })

License

MIT

Keywords

sp-fe-func

FAQs

Package last updated on 24 Aug 2018

Related posts