Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7208588
Merge pull request #1 from handyscript/handy-json
vvhybe Jun 25, 2023
9a5f377
Create dependabot.yml
vvhybe Jun 25, 2023
8569bc5
Merge pull request #3 from handyscript/dependabot-pkg-alerts
vvhybe Jun 25, 2023
1e6481e
Merge pull request #30 from handyscript/handy-json
vvhybe Sep 25, 2023
4078b46
Merge pull request #32 from handyscript/documentation
vvhybe Sep 25, 2023
ce26ca8
structure update
vvhybe Sep 26, 2023
0cbf44d
adding date module
vvhybe Sep 26, 2023
986f28f
bundelled modules
vvhybe Sep 26, 2023
6fce368
v1.3.0
vvhybe Sep 26, 2023
ad47be1
Merge pull request #33 from handyscript/config
vvhybe Sep 26, 2023
7a8bd1e
Merge pull request #34 from handyscript/dev
vvhybe Sep 26, 2023
5ddce41
Update and rename auto-assign.yml to auto-assign.txt
vvhybe Sep 27, 2023
e38067a
Merge pull request #35 from handyscript/pause-auto-assign-workflow
vvhybe Sep 27, 2023
667261e
adding `dropEntry` method to object module
vvhybe Oct 1, 2023
ef4189f
Merge branch 'main' of https://github.com/handyscript/handyscript
vvhybe Oct 1, 2023
6861b50
Bump rollup from 3.29.2 to 4.1.4
dependabot[bot] Oct 16, 2023
26752a0
Bump @babel/traverse from 7.22.20 to 7.23.2
dependabot[bot] Oct 19, 2023
aa48cab
Bump @typescript-eslint/eslint-plugin from 6.7.2 to 6.8.0
dependabot[bot] Oct 23, 2023
6e4d05d
Merge pull request #51 from handyscript/dependabot/npm_and_yarn/types…
vvhybe Oct 25, 2023
6ceaa36
Bump axios from 1.5.0 to 1.5.1
dependabot[bot] Oct 25, 2023
4a12faa
Bump eslint from 8.49.0 to 8.52.0
dependabot[bot] Oct 25, 2023
75dde51
Merge pull request #50 from handyscript/dependabot/npm_and_yarn/eslin…
vvhybe Oct 25, 2023
c4291da
Merge pull request #48 from handyscript/dependabot/npm_and_yarn/babel…
vvhybe Oct 25, 2023
7baf2d0
Merge pull request #47 from handyscript/dependabot/npm_and_yarn/rollu…
vvhybe Oct 25, 2023
b170a3c
Merge pull request #41 from handyscript/dependabot/npm_and_yarn/axios…
vvhybe Oct 25, 2023
84f4bcf
Bump @babel/traverse from 7.22.20 to 7.23.2 in /test
dependabot[bot] Oct 25, 2023
9c2e5fd
Bump rollup-plugin-typescript2 from 0.35.0 to 0.36.0
dependabot[bot] Oct 25, 2023
716c4bb
Merge pull request #38 from handyscript/dependabot/npm_and_yarn/rollu…
vvhybe Oct 25, 2023
a767699
Merge pull request #49 from handyscript/dependabot/npm_and_yarn/test/…
vvhybe Oct 25, 2023
d80922b
change function url documentation
vvhybe Oct 30, 2023
5bb46e8
change documentation date style
vvhybe Oct 30, 2023
4fcf6dc
test files
vvhybe Oct 30, 2023
10e7e56
pkg update
vvhybe Oct 30, 2023
f93e3c7
change module resolution
vvhybe Oct 30, 2023
738a0f7
bundeled modules
vvhybe Oct 30, 2023
bcedfb4
pkg
vvhybe Oct 30, 2023
bffe61f
update pkgs
vvhybe Oct 30, 2023
9fe5819
Bump rollup from 4.1.5 to 4.3.0
dependabot[bot] Nov 6, 2023
2fe2525
Merge pull request #52 from handyscript/dependabot/npm_and_yarn/rollu…
vvhybe Nov 8, 2023
174187d
github npm workflow package
vvhybe Nov 8, 2023
1e7448e
avoid Prototype-Pollution assisgnment #37
vvhybe Nov 8, 2023
fe965fe
Merge pull request #53 from handyscript/Fix-Prototype-polluting-assig…
vvhybe Nov 8, 2023
a3d44a2
fixed untracked files
vvhybe Nov 8, 2023
c4ec250
eslint update
vvhybe Nov 10, 2023
b63f933
migrate to webpack module bundler
vvhybe Nov 11, 2023
e2f6a41
adjusts paths
vvhybe Nov 11, 2023
5214e7b
2.0.0
vvhybe Nov 11, 2023
1835ab1
adding jest for test files
vvhybe Nov 11, 2023
bdc5b2c
update the package
vvhybe Nov 11, 2023
bedbdfd
change inside imports
vvhybe Nov 11, 2023
bcde1b8
exclude test files in webpack bundle files
vvhybe Nov 11, 2023
af0b8f6
disable `test script` for now
vvhybe Nov 11, 2023
a6d68ae
disable `test script` for now
vvhybe Nov 11, 2023
8c565cd
Merge branch 'main' of https://github.com/handyscript/handyscript
vvhybe Nov 11, 2023
4ca9126
1.4.1
vvhybe Nov 11, 2023
ccd4064
adding log token
vvhybe Nov 11, 2023
f02aa89
1.4.2
vvhybe Nov 11, 2023
4709aaa
adjust webpack bundleing
vvhybe Nov 13, 2023
746a565
add webpack bundle plugins
vvhybe Nov 13, 2023
3ce29bf
eslint .ignore file
vvhybe Nov 13, 2023
ce20668
update jest test configs to include all generated lib tests
vvhybe Nov 13, 2023
76b9fc2
update test files
vvhybe Nov 13, 2023
6ecde8d
add manual test file
vvhybe Nov 13, 2023
514919e
separate type for isolated ts types
vvhybe Nov 13, 2023
1b1332a
extend the date module with more methods
vvhybe Nov 13, 2023
4a7a0c7
fix/update string module docs and funcionality
vvhybe Nov 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change function url documentation
  • Loading branch information
vvhybe committed Oct 30, 2023
commit d80922b6dda68e208fa36c92e83ff98b8165c1a1
18 changes: 9 additions & 9 deletions lib/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,50 +38,50 @@ declare global {
shuffle(): T[];

/**
* Sort the array using the [`Bubble Sort`](https://www.programiz.com/dsa/bubble-sort) algorithm.
* Sort the array using the [`Bubble Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#bubble-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
bubbleSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;

/**
* Sort the array using the [`Selection Sort`](https://www.programiz.com/dsa/selection-sort) algorithm.
* Sort the array using the [`Selection Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#selection-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
selectionSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;

/**
* Sort the array using the [`Insertion Sort`](https://www.programiz.com/dsa/insertion-sort) algorithm.
* Sort the array using the [`Insertion Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#insertion-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
insertionSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;

/**
* Sort the array using the [`Merge Sort`](https://www.programiz.com/dsa/merge-sort) algorithm.
* Sort the array using the [`Merge Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#merge-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
mergeSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;

/**
* Sort the array using the [`Quick Sort`](https://www.programiz.com/dsa/quick-sort) algorithm.
* Sort the array using the [`Quick Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#quick-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
quickSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;

/**
* Sort the array using the [`Heap Sort`](https://www.programiz.com/dsa/heap-sort) algorithm.
* Sort the array using the [`Heap Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#heap-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
heapSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;

/**
* Sort the array using the [`Counting Sort`](https://www.programiz.com/dsa/counting-sort) algorithm.
* Sort the array using the [`Counting Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#counting-sort) algorithm.
** @note it supports only numbers
* @param {string} order the order of the sorting: "asc" or "desc"
*/
countingSort(this: number[], order?: SortOrder): number[];

/**
* Sort the array using the [`Bucket Sort`](https://www.programiz.com/dsa/bucket-sort) algorithm.
* Sort the array using the [`Bucket Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#bucket-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
bucketSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;
Expand All @@ -95,7 +95,7 @@ declare global {
radixSort(this: number[], radix?: number, order?: SortOrder): number[];

/**
* Sort the array using the [`Shell Sort`](https://www.programiz.com/dsa/shell-sort) algorithm.
* Sort the array using the [`Shell Sort`](https://github.com/handyscript/handyscript/wiki/Handy-Script-Array-Documentation#shell-sort) algorithm.
* @param {string} order // the order of the sorting: "asc" or "desc"
*/
shellSort(this: ComparableData[], order?: SortOrder): Array<ComparableData>;
Expand Down
14 changes: 8 additions & 6 deletions lib/date.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/// ------------------------------- HANDY DATE © HandyScript 9m/17d/23y -------------------------------
import axios from "axios";

declare global {
interface Date{
interface DateConstructor {
/**
* Returns the accurate date based on the current timezone
*@param timeZone The timezone to use like: `America/New_York`
*/
timestamp(timeZone?: string): Promise<Date>;
}

interface Date {
/**
* Returns the number of days in the month
*/
Expand All @@ -17,12 +18,12 @@ declare global {
* Returns the number of days in the year
*/
daysInYear(): number;

}
}

Date.prototype.timestamp = async function (timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone): Promise<Date> {
return new Date((await axios.get(`https://script.google.com/macros/s/AKfycbyd5AcbAnWi2Yn0xhFRbyzS4qMq1VucMVgVvhul5XqS9HkAyJY/exec?tz=${timeZone}`)).data.fulldate);
Date.timestamp = async function (timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone): Promise<Date> {
const { data } = await axios.get(`https://script.google.com/macros/s/AKfycbyd5AcbAnWi2Yn0xhFRbyzS4qMq1VucMVgVvhul5XqS9HkAyJY/exec?tz=${timeZone}`);
return new Date(data.fulldate);
};

Date.prototype.daysInMonth = function () {
Expand All @@ -33,4 +34,5 @@ Date.prototype.daysInYear = function () {
return new Date(this.getFullYear(), 12, 0).getDate();
};

export default Date;
export default Date;
// END: be15d9bcejpp
12 changes: 5 additions & 7 deletions lib/math.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,27 @@
declare global {
interface Math {
/**
* The Tau constant, equal to 2 * PI.
* The Tau constant, equal to 2 * PI. -> `Τ = 2π`
*/
TAU: number;

/**
* The square root of `3`. approximately `1.732`.
* The square root of `3`. approximately `1.732`. -> `√3 = 1.73205080...`.
*/
SQRT3: number;

/**
* The Golden ratio constant, approximately `1.618`.
* The Golden ratio constant, approximately `1.618`. -> `Φ = (√5 + 1)/2 = 1.6180339887...`
*/
PHI: number;

/**
* The Golomb-Dickman constant, approximately `0.624`.
* Math Formula: `G = 1 - G`
* The Golomb-Dickman constant, approximately `0.624`. -> `λ = 1 - G`
*/
G: number;

/**
* The Feigenbaum constant, approximately `4.669`.
* Math Formula: `delta = 1 - alpha`
* The Feigenbaum constant, approximately `4.669`. -> `Δ = 1- α`
*/
DELTA: number;

Expand Down