Socket
Socket
Sign inDemoInstall

0e

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

0e - npm Package Compare versions

Comparing version 0.0.2 to 0.0.101

dist/index-cjs.js

40

package.json
{
"name": "0e",
"version": "0.0.002",
"version": "0.0.101",
"description": "A library that makes the Fetch API a breeze",

@@ -9,2 +9,3 @@ "main": "dist/index-cjs.js",

"scripts": {
"u": "ncu -u && npm update",
"test": "jest",

@@ -17,31 +18,34 @@ "test:watch": "jest --watch",

"dependencies": {
"@babel/runtime": "^7.8.4",
"@babel/runtime": "^7.15.4",
"btoa": "^1.2.1",
"cross-fetch": "^3.0.4"
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.4",
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@types/jest": "^25.1.3",
"babel-jest": "^25.1.0",
"@babel/core": "^7.15.5",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.6",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@types/jest": "^27.0.1",
"babel-jest": "^27.2.0",
"body-parser": "^1.19.0",
"express": "^4.17.1",
"form-data": "^3.0.0",
"jest": "^25.1.0",
"form-data": "^4.0.0",
"jest": "^27.2.0",
"jest-extended": "^0.11.5",
"np": "^6.1.0",
"np": "^7.5.0",
"portastic": "^1.0.1",
"rimraf": "^3.0.2",
"rollup": "^1.31.1",
"rollup": "^2.56.3",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-terser": "^5.2.0",
"standard": "^14.3.1",
"supertest": "^4.0.2"
"standard": "^16.0.3",
"supertest": "^6.1.6"
},
"np": {
"yarn": false,
"contents": "dist"
}
}

@@ -7,3 +7,2 @@ import globals from 'rollup-plugin-node-globals'

import babel from 'rollup-plugin-babel'
import { terser } from 'rollup-plugin-terser'

@@ -26,3 +25,3 @@ const pkg = require('./package.json')

sourcemap: false,
plugins: [terser()]
plugins: []
}

@@ -29,0 +28,0 @@ }),

/* globals beforeEach afterEach describe expect it */
import zlFetch from '../src/index'
import zz from '../src/index'
import app from './helpers/createServer'

@@ -25,3 +25,3 @@

// Sends GET requests with queries
const { response } = await zlFetch(`${rootendpoint}/queries`, {
const { response } = await zz(`${rootendpoint}/queries`, {
queries: {

@@ -42,3 +42,3 @@ normal: 'normal',

it('x-www-form-urlencoded', async () => {
const { response } = await zlFetch(`${rootendpoint}/body`, {
const { response } = await zz(`${rootendpoint}/body`, {
method: 'post',

@@ -55,3 +55,3 @@ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },

it('JSON', async () => {
const { response } = await zlFetch(`${rootendpoint}/body`, {
const { response } = await zz(`${rootendpoint}/body`, {
method: 'post',

@@ -74,3 +74,3 @@ body: { message: 'good game' }

// Should handle JSON
const { response } = await zlFetch(`${rootendpoint}/json`)
const { response } = await zz(`${rootendpoint}/json`)
const { key } = await response.json()

@@ -82,3 +82,3 @@ expect(key).toBe('value')

// Should handle Text
const { response } = await zlFetch(`${rootendpoint}/text`)
const { response } = await zz(`${rootendpoint}/text`)
const text = await response.text()

@@ -89,3 +89,3 @@ expect(text).toBe('A paragraph of text')

it('Should throw if JSON error', async done => {
zlFetch(`${rootendpoint}/text-error`).then(ok => {
zz(`${rootendpoint}/text-error`).then(ok => {
expect(ok).toBeUndefined()

@@ -92,0 +92,0 @@ done()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc