2.7.7 • Published 2 years ago

node_basetest v2.7.7

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

node_basetest

License: MIT NPM Downloads Play with docs

Instructions:

npm install node_basetest
const node_basetest =  require('node_basetest')

If utilizing in html...:

<script src="./node_modules/node_basetest/index.js"></script>
<script> 
$(()=> { 
     const output =  node_basetest.method(parameter)
 })
</script>

Functions

HASHELPER(one, two) ⇒ any

Kind: global function
Date: 2022-02-09
Author: zen-out

ParamType
oneany
twoany

Example

it('we need to test well', () => {
        T(HASHELPER("div div", "div")) // true 
        F(HASHELPER("DIV", "div")) // false
        F(HASHELPER("dispaiv", "div")) // false
        T(HASHELPER("div div div", "div")) // 
    });

HAS(one, two) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
oneany
twoany

Example

it('the problem is that the syntax is annoying', () => {\
        HAS("div div", "div") // true 
        HAS("DIV", "div") // false
        HAS("dispaiv", "div") // false
        HAS("div div div", "div") // 
    });

STARTSWITHHELPER(string, substring) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
stringany
substringany

Example

it("starts with", () => {
        T(STARTSWITHHELPER("hello", "h"))
        F(STARTSWITHHELPER("hello", "b"))
    })

STARTSWITH(string, substring) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
stringany
substringany

Example

it("starts with", () => {
        STARTSWITH("hello", "h")
        STARTSWITH("hello", "b")
    })

ENDSWITHHELPER(string, substring) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
stringany
substringany

Example

it("ends with", () => {
        F(ENDSWITHHELPER("HELLO", "o"))
        T(ENDSWITHHELPER("<div></div>", "</div>"))
    })

ENDSWITH(string, substring) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
stringany
substringany

Example

it("ends with", () => {
        ENDSWITH("HELLO", "o")
        ENDSWITH("<div></div>", "</div>")
    })

COUNTHELPER(type, item, amount) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
typeany
itemany
amountany

Example

it('', () => {
            F(COUNTHELPER("hello hellodi", "div", 2)) // false
            T(COUNTHELPER("hello hellodi", "hello", 2)) // true 
        });

COUNT(type, item, amount) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
typeany
itemany
amountany

Example

it('', () => {
        t.COUNT("div div div", "div", 9)
        COUNT("div div div", "div", 9) // false
        COUNT("hello hellodi", "div", 2) // false
        COUNT("hello hellodi", "hello", 2) // true 
        COUNT("divdiv<div>{{<div>", "div", 4) // true
    });

ATLEASTHELPER(type, item, amount) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
typeany
itemany
amountany

Example

it("", () => {
        T(ATLEASTHELPER("div div", "div", 1)) //true 
        T(ATLEASTHELPER("div div", "div", 2)) //true 
        F(ATLEASTHELPER("div div", "div", 3)) //false 
    })

ATLEAST(type, item, amount) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
typeany
itemany
amountany

Example

it("", () => {
        ATLEAST("div div", "div", 1) //true 
        ATLEAST("div div", "div", 2) //true 
        ATLEAST("div div", "div", 3) //false 
    })

ISLESSHELPER(first, second, type) ⇒ any

Kind: global function
Date: 2022-02-17

ParamType
firstany
secondany
typeany

Example

T(ISLESSHELPER("a", "b", "string"))
        T(ISLESSHELPER(1, 2, "number"))
        T(ISLESSHELPER("Dec 11, 1993", "Dec 11, 1994", "date"))
        F(ISLESSHELPER("b", "a", "string"))
        F(ISLESSHELPER(2, 1, "number"))
        F(ISLESSHELPER("Dec 11, 1996", "Dec 11, 1995", "date"))

ISLESS(one, two, type) ⇒ any

Kind: global function
Date: 2022-02-17

ParamType
oneany
twoany
typeany

Example

ISLESS("a", "b", "string")
        ISLESS(1, 2, "number")
        ISLESS("Dec 11, 1993", "Dec 11, 1994", "date")
        ISLESS("b", "a", "string")
        ISLESS(2, 1, "number")
        ISLESS("Dec 11, 1996", "Dec 11, 1995", "date")

DOESNOTHAVEHELPER(string, item) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
stringany
itemany

Example

it('', () => {
            F(DOESNOTHAVEHELPER("{{>", ">")) // false (matches the full instance)
            T(DOESNOTHAVEHELPER("{{>", "asdf")) // true (matches the full instance)
        });

DOESNOTHAVE(string, item) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
stringany
itemany

Example

it(' ', () => {
        DOESNOTHAVE("{{>", ">") // passes (matches the full instance)
        DOESNOTHAVE("{{>", "asdf") // passes
    });

TRUNCATE(string, length, ending) ⇒ any

Kind: global function
Date: 2022-02-09
Author: zen-out

ParamType
stringany
lengthany
endingany

Example

TRUNCATE("long test", 8, "...") // long tes...

WRAPHTML(string, div, options) ⇒ any

Kind: global function
Date: 2022-02-09
Author: zen-out

ParamType
stringany
divany
optionsany

Example

WRAPHTML("lezzles11","div",{
  "id": "content",
  "class": "left bullet"
})
<div id="content" class="left bullet">lezzles11</div>

T(value) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
valueany

Example

it("my fav part of coding is making things", () => {
        T(STARTSWITHHELPER("hello", "h"))
    })

F(value) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
valueany

Example

it("but in order to code well", () => {
        F(ATLEASTHELPER("div div", "div", 3)) //false 
    })

ISTYPEOFHELPER(data, type) ⇒ any

ISTYPEOFHELPER

Kind: global function
Date: 2022-03-01

ParamType
dataany
typeany

ISTYPEOF(data, type) ⇒ any

Kind: global function
Date: 2022-02-10
Author: zen-out

ParamType
dataany
typeany

Example

it('y ', () => {
        ISTYPEOF({ "hello": "whatsup" }, "object")
        ISTYPEOF("imaball", "string")
        ISTYPEOF(["asdf"], "array")
        ISTYPEOF(false, "boolean")
    });
2.7.0

2 years ago

2.6.15

2 years ago

2.7.1

2 years ago

2.6.14

2 years ago

2.7.4

2 years ago

2.7.6

2 years ago

2.7.5

2 years ago

2.7.7

2 years ago

2.6.11

2 years ago

2.6.12

2 years ago

2.6.13

2 years ago

2.6.10

2 years ago

2.6.5

2 years ago

2.6.7

2 years ago

2.6.6

2 years ago

2.6.9

2 years ago

2.6.8

2 years ago

2.6.4

2 years ago

2.6.3

2 years ago

2.6.1

2 years ago

2.6.0

2 years ago

2.5.0

2 years ago

2.3.1

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.19.0

2 years ago

1.18.0

2 years ago

1.16.0

2 years ago

1.14.0

2 years ago

1.13.0

2 years ago

1.12.0

2 years ago

1.11.0

2 years ago

1.10.0

2 years ago

1.9.0

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago