{ | ||
"name": "alga-js", | ||
"version": "0.0.9", | ||
"version": "0.1.0-alpha-5", | ||
"description": "Alga.js is a JavaScript helper to help build UI components by using any of modern web frameworks or libraries", | ||
"module": "dist/alga.min.js", | ||
"main": "dist/alga-umd.js", | ||
"module": "./lib/alga.es.js", | ||
"main": "./lib/alga.js", | ||
"exports": { | ||
".": { | ||
"import": "dist/alga.min.js", | ||
"require": "dist/alga-umd.js" | ||
"import": "./dist/alga.es.js", | ||
"require": "./dist/alga-cjs.js", | ||
"types": "./types/alga.d.ts" | ||
}, | ||
"./lib/*": "./lib/*.es.js", | ||
"./lib/*.js": "./lib/*.js", | ||
"./date": { | ||
"import": "./lib/date/date.es.js", | ||
"require": "./lib/date/date.cjs.js", | ||
"types": "./types/date/date.d.ts" | ||
}, | ||
"./number": { | ||
"import": "./lib/number/number.es.js", | ||
"require": "./lib/number/number.cjs.js", | ||
"types": "./types/number/number.d.ts" | ||
}, | ||
"./array": { | ||
"import": "./lib/array/array.es.js", | ||
"require": "./lib/array/array.cjs.js", | ||
"types": "./types/array/array.d.ts" | ||
}, | ||
"./object": { | ||
"import": "./lib/object/object.es.js", | ||
"require": "./lib/object/object.cjs.js", | ||
"types": "./types/object/object.d.ts" | ||
}, | ||
"./string": { | ||
"import": "./lib/string/string.es.js", | ||
"require": "./lib/string/string.cjs.js", | ||
"types": "./types/string/string.d.ts" | ||
}, | ||
"./time": { | ||
"import": "./lib/time/time.es.js", | ||
"require": "./lib/time/time.cjs.js", | ||
"types": "./types/time/time.d.ts" | ||
} | ||
}, | ||
"unpkg": "dist/alga-umd.js", | ||
"typings": "types/app.d.ts", | ||
"unpkg": "./lib/alga.js", | ||
"typings": "./types/alga.d.ts", | ||
"files": [ | ||
"js", | ||
"dist/alga.min.js", | ||
"dist/alga-umd.js", | ||
"lib/*.js", | ||
"ts", | ||
"lib/**/*.js", | ||
"types/**/*.d.ts" | ||
@@ -33,4 +64,4 @@ ], | ||
"alga-js", | ||
"framework", | ||
"front-end", | ||
"library", | ||
"helpers", | ||
"utilities" | ||
@@ -46,14 +77,15 @@ ], | ||
"@babel/core": "^7.12.10", | ||
"@babel/plugin-proposal-class-properties": "^7.12.1", | ||
"@babel/plugin-proposal-throw-expressions": "^7.12.1", | ||
"@babel/preset-env": "^7.12.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@rollup/plugin-babel": "^5.2.2", | ||
"@rollup/plugin-node-resolve": "^11.1.0", | ||
"@rollup/plugin-node-resolve": "^13.1.3", | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@types/jest": "^27.4.0", | ||
"eslint": "^7.20.0", | ||
"jest": "^26.6.3", | ||
"jest": "^27.4.7", | ||
"rollup": "^2.36.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"typescript": "^4.2.4" | ||
}, | ||
"dependencies": {} | ||
"ts-jest": "^27.1.3", | ||
"typescript": "^4.5.4" | ||
} | ||
} |
@@ -15,3 +15,3 @@ <p align="center" style="text-align: center"> | ||
# Alga.js | ||
Alga.js is a JavaScript helper to help build UI components by using any of modern web frameworks or libraries, especially the frameworks that we currently use like Vue, Petite-Vue, Alpine.js and Vanilla Web Components to produce our custom elements, see [the documentation here](https://tedirghazali.gitbook.io/algajs/) or visit this link `tedirghazali.gitbook.io/algajs`. | ||
Alga.js is a JavaScript helper to help build UI components by using any of modern web frameworks or libraries, especially the frameworks that we currently use like Vue, Petite-Vue, Alpine.js and Vanilla Web Components to produce our custom elements, see [the documentation here](https://algajs.tedir.dev) or visit this link `https://algajs.tedir.dev`. | ||
@@ -22,3 +22,3 @@ ## Installation | ||
```sh | ||
npm install alga-js | ||
npm install alga-js --save-dev | ||
@@ -35,7 +35,9 @@ #or | ||
// ES modules | ||
import { array, object, string, number, func, date, ...others* } from 'alga-js' // or | ||
import * as $ from 'alga-js' | ||
import { paginate, pages, pageInfo, pagination, ... } from 'alga-js/array' // highly recommended | ||
import { array, object, string, number, func, date, ...others* } from 'alga-js' // don't use this import | ||
import * as $ from 'alga-js' // don't use this import | ||
// Node/CommonJS modules | ||
const $ = require('alga-js') | ||
const $ = require('alga-js') // other than $, you can use algaJs or any variable name | ||
@@ -50,3 +52,3 @@ // UMD (AMD/IIFE) | ||
// Tree-shakable | ||
// Tree-shakable // not recommended | ||
import { paginate, pages, ... } from 'alga-js/lib/array.js' | ||
@@ -53,0 +55,0 @@ import { weeks } from 'alga-js/lib/date.js' // or |
@@ -1,51 +0,9 @@ | ||
import { insert } from "./insertArray.js"; | ||
import { insertFirst } from "./insertArray.js"; | ||
import { insertLast } from "./insertArray.js"; | ||
import { insertBefore } from "./insertArray.js"; | ||
import { insertAfter } from "./insertArray.js"; | ||
import { update } from "./updateArray.js"; | ||
import { updateBy } from "./updateArray.js"; | ||
import { destroy } from "./destroyArray.js"; | ||
import { select } from "./selectArray.js"; | ||
import { hidden } from "./selectArray.js"; | ||
import { toggle } from "./toggleArray.js"; | ||
import { flatten } from "./flattenArray.js"; | ||
import { nested } from "./nestedArray.js"; | ||
import { index } from "./indexArray.js"; | ||
import { toIndex } from "./indexArray.js"; | ||
import { randomIndex } from "./indexArray.js"; | ||
import { search } from "./searchArray.js"; | ||
import { searchBy } from "./searchArray.js"; | ||
import { filter } from "./filterArray.js"; | ||
import { sort } from "./sortArray.js"; | ||
import { sortBy } from "./sortArray.js"; | ||
import { sortWith } from "./sortArray.js"; | ||
import { paginate } from "./paginateArray.js"; | ||
import { pages } from "./paginateArray.js"; | ||
import { pageInfo } from "./paginateArray.js"; | ||
import { pagination } from "./paginateArray.js"; | ||
import { sum } from "./sumArray.js"; | ||
import { calculate } from "./calculateArray.js"; | ||
import { unique } from "./uniqueArray.js"; | ||
import { isArray } from "./isArray.js"; | ||
import { isSuperset } from "./isArray.js"; | ||
import { union } from "./unionArray.js"; | ||
import { intersection } from "./intersectionArray.js"; | ||
import { difference } from "./differenceArray.js"; | ||
import { asymmetricDifference } from "./differenceArray.js"; | ||
import { complement } from "./differenceArray.js"; | ||
import { without } from "./differenceArray.js"; | ||
import { transpose } from "./transposeArray.js"; | ||
import { zip } from "./zipArray.js"; | ||
import { unzip } from "./unzipArray.js"; | ||
import { range } from "./rangeArray.js"; | ||
import { move } from "./moveArray.js"; | ||
import { switched } from "./moveArray.js"; | ||
import { transfer } from "./moveArray.js"; | ||
import { compact } from "./compactArray.js"; | ||
import { chunk } from "./chunkArray.js"; | ||
import { shuffle } from "./shuffleArray.js"; | ||
import { group } from "./groupArray.js"; | ||
import { countDuplication } from "./countArray.js"; | ||
import { countBy } from "./countArray.js"; | ||
export { insert, insertFirst, insertLast, insertBefore, insertAfter, update, updateBy, destroy, select, hidden, toggle, flatten, nested, index, toIndex, randomIndex, search, searchBy, filter, filter as filtered, sort, sortBy, sortBy as sorted, sortWith, paginate, pages, pageInfo, pageInfo as show, pagination, sum, calculate, calculate as calc, unique, isArray, isSuperset, union, intersection, difference, asymmetricDifference, complement, without, transpose, zip, unzip, range, move, switched, transfer, compact, chunk, shuffle, group, countDuplication, countBy }; | ||
export * from './uniqArray.js'; | ||
export * from './takeArray.js'; | ||
export * from './nestedArray.js'; | ||
export * from './flattenArray.js'; | ||
export * from './searchArray.js'; | ||
export * from './filterArray.js'; | ||
export * from './sortArray.js'; | ||
export * from './paginateArray.js'; | ||
export * from './duplicateArray.js'; |
@@ -1,1 +0,1 @@ | ||
export function filter(fromArr: any, filterObj: any): any[]; | ||
export declare const filter: (fromArray: any[], filterObject: any) => any[]; |
@@ -1,1 +0,6 @@ | ||
export function flatten(nestArr: any, options?: {}): any[]; | ||
export declare const flatten: (nestArray: any[], options?: { | ||
prop: string; | ||
parent: string; | ||
children: string; | ||
}) => any[]; | ||
export declare const flattenAsync: (nestPromise: Promise<any[]>, options?: any) => Promise<any[]>; |
@@ -1,1 +0,6 @@ | ||
export function nested(flatArr: any, options?: {}): any[]; | ||
export declare const nested: (flatArray: any[], options?: { | ||
prop: string; | ||
parent: string; | ||
children: string; | ||
}) => any[]; | ||
export declare const nestedAsync: (flatPromise: Promise<any[]>, options?: any) => Promise<any[]>; |
@@ -1,11 +0,4 @@ | ||
export function paginate(fromArr: any, pageActive?: number, limitPerPage?: number): any[]; | ||
export function pages(fromArr: any, limitPerPage?: number): number; | ||
export function pageInfo(fromArr: any, pageActive?: number, limitPerPage?: number): { | ||
from: number; | ||
start: number; | ||
to: number; | ||
end: number; | ||
of: number; | ||
length: number; | ||
}; | ||
export function pagination(totalPages: any, pageActive?: number, positionOfEllipsis?: number): number[]; | ||
export declare const paginate: (fromArray: any[], pageActive?: number, limitPerPage?: number) => any[]; | ||
export declare const pages: (lengthOfArray: any[] | number, limitPerPage?: number) => number; | ||
export declare const pageInfo: (fromArray: any[], pageActive?: number, limitPerPage?: number) => any; | ||
export declare const pagination: (totalPages: number, pageActive?: number, positionOfEllipsis?: number) => string[]; |
@@ -1,2 +0,2 @@ | ||
export function search(fromArr: any, ...searchStr: any[]): any[]; | ||
export function searchBy(fromArr: any, queryArr: any, propArr: any): any[]; | ||
export declare const search: (fromArrayay: any[], ...searchString: any[]) => any[]; | ||
export declare const searchBy: (fromArray: any[], queryArray: any[], propArray: string[]) => any[]; |
@@ -1,3 +0,3 @@ | ||
export function sort(fromArr: any, sortStr?: string): any[]; | ||
export function sortBy(fromArr: any, propStr: any, sortStr?: string): any[]; | ||
export function sortWith(fromArr: any, compareFunc: any): any[]; | ||
export declare const sortBy: (fromArray: any[], propString: string, sortString?: string) => any[]; | ||
export declare const sort: (fromArray: any[], propString: string, sortString?: string) => any[]; | ||
export declare const order: (fromArray: any[], newProp?: string) => any[]; |
@@ -1,32 +0,7 @@ | ||
import { now } from "./nowDate.js"; | ||
import { nowHijri } from "./nowDate.js"; | ||
import { parse } from "./parseDate.js"; | ||
import { utc } from "./utcDate.js"; | ||
import { addDate } from "./addDate.js"; | ||
import { subtractDate } from "./subtractDate.js"; | ||
import { rangeDate } from "./rangeDate.js"; | ||
import { day } from "./dayDate.js"; | ||
import { days } from "./dayDate.js"; | ||
import { daysInMonth } from "./dayDate.js"; | ||
import { daysInYear } from "./dayDate.js"; | ||
import { daysInBetween } from "./dayDate.js"; | ||
import { week } from "./weekDate.js"; | ||
import { weeks } from "./weekDate.js"; | ||
import { weeksInMonth } from "./weekDate.js"; | ||
import { weeksInYear } from "./weekDate.js"; | ||
import { month } from "./monthDate.js"; | ||
import { months } from "./monthDate.js"; | ||
import { isYear } from "./isDate.js"; | ||
import { isMonth } from "./isDate.js"; | ||
import { isDate } from "./isDate.js"; | ||
import { isFullDate } from "./isDate.js"; | ||
import { isFormatDate } from "./isDate.js"; | ||
import { isLeapYear } from "./isDate.js"; | ||
import { calendar } from "./calendarDate.js"; | ||
import { daysInCalendar } from "./calendarDate.js"; | ||
import { prevDaysInCalendar } from "./calendarDate.js"; | ||
import { nextDaysInCalendar } from "./calendarDate.js"; | ||
import { weeklyCalendar } from "./calendarDate.js"; | ||
import { calendarWithWeeks } from "./calendarDate.js"; | ||
import { dateToArray } from "./arrayDate.js"; | ||
export { now, nowHijri, parse, parse as parseDate, utc, addDate, subtractDate, rangeDate, day, days, daysInMonth, daysInYear, daysInBetween, week, weeks, weeksInMonth, weeksInYear, month, months, isYear, isMonth, isDate, isFullDate, isFormatDate, isLeapYear, calendar, daysInCalendar, prevDaysInCalendar, nextDaysInCalendar, weeklyCalendar, calendarWithWeeks, dateToArray }; | ||
export * from './nowDate.js'; | ||
export * from './formatDate.js'; | ||
export * from './isDate.js'; | ||
export * from './numberDate.js'; | ||
export * from './stringDate.js'; | ||
export * from './monthDate.js'; | ||
export * from './yearDate.js'; |
@@ -1,1 +0,1 @@ | ||
export function format(dateParam: any, formatStr: any, locale?: string, dayType?: string): any; | ||
export declare const format: (date: Date | string | number, type?: string, locale?: string, options?: any) => string; |
@@ -1,6 +0,4 @@ | ||
export function isYear(yearParams: any): boolean; | ||
export function isMonth(monthParams: any): boolean; | ||
export function isDate(dateParams: any): boolean; | ||
export function isFullDate(dateParams: any): boolean; | ||
export function isFormatDate(formatParams: any): boolean; | ||
export function isLeapYear(yearParams: any): boolean; | ||
import type { IsDate } from './dateType'; | ||
export declare const isBefore: (isDate: IsDate, beforeDate: IsDate, modeDate?: string) => boolean; | ||
export declare const isAfter: (isDate: IsDate, afterDate: IsDate, modeDate?: string) => boolean; | ||
export declare const isBetween: (isDate: IsDate, startDate: IsDate, endDate: IsDate, modeDate?: string) => boolean; |
@@ -1,2 +0,2 @@ | ||
export function month(yearParam: any, monthParam: any, locale?: string, monthType?: string): string; | ||
export function months(locale?: string, monthType?: string): string[]; | ||
export declare const month: (yearArg?: number, monthArg?: number, locale?: string, monthType?: string) => string; | ||
export declare const months: (locale?: string, monthType?: string) => any[]; |
@@ -1,2 +0,1 @@ | ||
export function now(dateFormat?: any): string; | ||
export function nowHijri(locale?: string): string; | ||
export declare const now: (type?: string, locale?: string, options?: any) => string; |
@@ -1,8 +0,6 @@ | ||
import { random } from "./randomNumber.js"; | ||
import { loop } from "./loopNumber.js"; | ||
import { isNumber } from "./isNumber.js"; | ||
import { isPositive } from "./isNumber.js"; | ||
import { isNegative } from "./isNumber.js"; | ||
import { calc } from "./calcNumber.js"; | ||
import { currency } from "./currencyNumber.js"; | ||
export { random, loop, isNumber, isPositive, isNegative, calc, currency }; | ||
export * from './separatorNumber.js'; | ||
export * from './percentageNumber.js'; | ||
export * from './unitNumber.js'; | ||
export * from './spaceNumber.js'; | ||
export * from './roundNumber.js'; | ||
export * from './betweenNumber.js'; |
@@ -1,9 +0,1 @@ | ||
import { remove } from "./removeObject.js"; | ||
import { removeBy } from "./removeObject.js"; | ||
import { merge } from "./mergeObject.js"; | ||
import { replace } from "./mergeObject.js"; | ||
import { isObject } from "./isObject.js"; | ||
import { isObjectValues } from "./isObject.js"; | ||
import { invert } from "./invertObject.js"; | ||
import { clone } from "./cloneObject.js"; | ||
export { remove, removeBy, merge, replace, isObject, isObjectValues, invert, clone }; | ||
export * from './removeObject.js'; |
@@ -1,2 +0,4 @@ | ||
export function remove(fromObj: any, ...propKey: any[]): any; | ||
export function removeBy(fromObj: any, ...propVal: any[]): {}; | ||
export declare const remove: (fromObject: any, ...propKey: any[]) => any; | ||
export declare const removeBy: (fromObject: any, ...propVal: any[]) => any; | ||
export declare const removeByKey: (fromObject: any, ...propKey: any[]) => any; | ||
export declare const removeByVal: (fromObject: any, ...propVal: any[]) => any; |
@@ -1,1 +0,1 @@ | ||
export function capitalize(str: any, opt?: string): string; | ||
export declare const capitalize: (str: string, opt?: string) => string; |
@@ -1,5 +0,6 @@ | ||
import { split } from "./splitString.js"; | ||
import { capitalize } from "./capitalizeString.js"; | ||
import { includes } from "./includesString.js"; | ||
import { isString } from "./isString.js"; | ||
export { split, capitalize, includes, isString }; | ||
export * from './urlString.js'; | ||
export * from './uniqString.js'; | ||
export * from './randomString.js'; | ||
export * from './capitalizeString.js'; | ||
export * from './caseString.js'; | ||
export * from './slugString.js'; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
276880
0.3%5579
50.05%54
3.85%13
18.18%106
-40.78%1
Infinity%