Skip to content

Commit

Permalink
move on to v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
A-yon Lee committed Feb 26, 2024
1 parent 15c4269 commit 1e97bb2
Show file tree
Hide file tree
Showing 110 changed files with 578 additions and 947 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ name: Deno

on:
push:
branches: ["main"]
branches: ["main", "v0.4"]
pull_request:
branches: ["main"]
branches: ["main", "v0.4"]

permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Node.js CI

on:
push:
branches: [ main ]
branches: [ main, v0.4 ]
pull_request:
branches: [ main ]
branches: [ main, v0.4 ]

jobs:
build:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/tsx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ main, v0.4 ]
pull_request:
branches: [ main, v0.4 ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- run: npm run test:tsx
28 changes: 0 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,6 @@ included in the future. Each function is stored in a separated file.
- `trim` [.ts](./trim.ts)
- `typeOf` [.ts](./typeOf.ts)

**Deprecated**

Since v0.3.0, the following functions have been merged to [@ayonli/jsext](https://github.com/ayonli/jsext).
The two packages serve different purposes, while **@ayonli/jsext** provides basic and semantic APIs
for the JavaScript language, **@hyurl/utils** provides higher level functions that deal with objects.

This package still keeps a link to these functions, but they have been marked __deprecated__ and
will be removed in v0.4.0.

- `isFloat` use `isFloat` from `@ayonli/jsext/number` instead.
- `isInteger` use `Number.isInteger` instead.
- `isNumeric` use `isNumeric` from `@ayonli/jsext/number` instead.
- `isBetween` use `isBetween` from `@ayonli/jsext/number` instead.
- `isOwnKey` use `hasOwn` from `@ayonli/jsext/object` instead.
- `isOwnMethod` use `hasOwnMethod` from `@ayonli/jsext/object` instead.
- `isSubClassOf` use `jsext.isSubclassOf` from `@ayonli/jsext` instead.
- `isVoid` use `!isValid` from `@ayonli/jsext/object` instead.
- `omit` use `omit` from `@ayonli/jsext/object` instead.
- `pick` use `pick` from `@ayonli/jsext/object` instead.
- `omitVoid` use `omitInvalid` instead.
- `rand` use `random` from `@ayonli/jsext/number` instead.
- `randStr` use `random` from `@ayonli/jsext/string` instead.
- `sleep` use `sleep` from `@ayonli/jsext/promise` instead.
- `typeAs` use `as` from `@ayonli/jsext/object` instead.
- `until` use `until` from `@ayonli/jsext/promise` instead.
- `useThrottle` use `jsext.throttle` from `@ayonli/jsext` instead.
- `wrap` use `jsext.wrap` from `@ayonli/jsext` instead.

## Import

There are many ways to import these functions.
Expand Down
2 changes: 1 addition & 1 deletion bundle/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions diff.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isDictLike } from "https://lib.deno.dev/x/is_like@latest/index.js";
import { isValid } from "https://lib.deno.dev/x/ayonli_jsext@latest/object/index.ts";
import isEmpty from "./isEmpty.ts";
import isVoid from "./isVoid.ts";


/**
Expand Down Expand Up @@ -29,7 +29,7 @@ export default function diff(origin: any, input: any, deep = false) {

keys.forEach(key => {
if (origin[key] !== input[key] &&
!(isVoid(origin[key]) && isVoid(input[key])) // ignore void values
(isValid(origin[key]) || isValid(input[key])) // only valid values
) {
if (deep &&
typeof origin[key] === "object" && origin[key] !== null &&
Expand Down
2 changes: 1 addition & 1 deletion esm/count.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1e97bb2

Please sign in to comment.