@casper124578/utils
    TypeScript icon, indicating that this package has built-in type declarations

    1.3.0 • Public • Published

    @casper124578/utils

    A package with useful node util functions (mostly for my personal projects)

    Example

    ts example

    import * as yup from "yup";
    import { validateSchema } from "@casper124578/utils";
    
    const testSchemaObj = {
      email: yup.string().required().email(),
      password: yup.string().required().min(8),
    };
    
    // later in the code
    const data = {
      /* some data here */
    };
    
    const [error] = await validateSchema(testSchemaObj, data);
    
    if (error) {
      return console.log("validation error!", error);
    }
    
    console.log("validation success!");

    Install

    npm i @casper124578/utils

    DownloadsWeekly Downloads

    283

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    9.47 kB

    Total Files

    17

    Last publish

    Collaborators

    • casper124578