UNPKG

@heknon/node-webtop

Version:

A Backend for an unofficial WebTop (SmartSchool - Israel) API.

21 lines (20 loc) 1.32 kB
import { Time, SchoolHour, Class } from "./DataObjects"; import moment = require("moment"); /** * wrapper for for loop * @param from from what number * @param to to what number (-1) * @param callback function to be called on each `i` */ export declare const forloop: (from: number, to: number, callback: Function) => void; export declare const dayNumberToString: (dayNum: number) => "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday"; export declare const isStringNumber: (str: string) => boolean; export declare const inboxSenderTypeFromString: (str: string) => "MessageSenderType.Teacher" | "MessageSenderType.Principal" | "MessageSenderType.Pupil" | "N/A"; export declare const constructTime: (time: string) => Time; export declare const extractDateFromString: (str: string) => moment.Moment; export declare const constructSchoolHour: (from: string, to: string) => SchoolHour; export declare const extractSchoolHoursFromString: (str: string) => "כל היום" | SchoolHour[]; export declare const extractClassFromString: (str: string, level: number) => Class; export declare const extractClassesFromString: (str: string) => Class[]; export declare const stripHTML: (html: string) => string; export declare const classToNumber: (str: string) => number | undefined;