You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cypress-pipe

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-pipe - npm Package Compare versions

Comparing version

to
1.6.2

54

index.d.ts
/// <reference types="cypress" />
declare namespace Cypress {
interface Chainable<Subject> {
/**
* Enables you to work with the subject yielded from the previous command.
* Similar to `cy.then`, except the function can be re-evaluated if followed by
* a `.should` AND returns a value synchronously (no `cy` commands inside).
* In this instance, your function should not have any side effects and could be run
* many times per second.
*
* ```ts
* const getChildren = $el => $el.children()
*
* cy.get('body')
* .pipe(getChildren)
* .should('have.length', 3)
* ```
*/
pipe<S>(
fn: (this: { [key: string]: any }, currentSubject: Subject) => Chainable<S> | Promise<S>,
options?: Partial<Timeoutable & Loggable>,
): Chainable<S>
pipe<S extends object | any[] | string | number | boolean | undefined | null>(
fn: (this: { [key: string]: any }, currentSubject: Subject) => S,
options?: Partial<Timeoutable & Loggable>,
): Chainable<S>
declare global {
namespace Cypress {
interface Chainable<Subject> {
/**
* Enables you to work with the subject yielded from the previous command.
* Similar to `cy.then`, except the function can be re-evaluated if followed by
* a `.should` AND returns a value synchronously (no `cy` commands inside).
* In this instance, your function should not have any side effects and could be run
* many times per second.
*
* ```ts
* const getChildren = $el => $el.children()
*
* cy.get('body')
* .pipe(getChildren)
* .should('have.length', 3)
* ```
*/
pipe<S>(
fn: (this: { [key: string]: any }, currentSubject: Subject) => Chainable<S> | Promise<S>,
options?: Partial<Timeoutable & Loggable>,
): Chainable<S>
pipe<S extends object | any[] | string | number | boolean | undefined | null>(
fn: (this: { [key: string]: any }, currentSubject: Subject) => S,
options?: Partial<Timeoutable & Loggable>,
): Chainable<S>
}
}
}
export { loggable } from './loggable'
/// <reference types="cypress" />
const { loggable } = require('./loggable')
module.exports = { loggable }
const isJquery = obj =>

@@ -4,0 +8,0 @@ !!(obj && obj.jquery && Cypress._.isFunction(obj.constructor))

{
"name": "cypress-pipe",
"version": "1.6.1",
"version": "1.6.2",
"description": "Create custom commands using plain-old functions",

@@ -33,4 +33,4 @@ "main": "index.js",

"devDependencies": {
"cypress": "^3.8.1"
"cypress": "^4.0.2"
}
}