Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tricks

MrSwitch1.6kISC2.1.0

ES6 modules

Es6, modules

readme

Tricks

Herein lies some tricks to pull out of the hat for faster backfront development.

CI NPM Version Known Vulnerabilities

Install

After installing tricks ...

npm i tricks

Example usage...

Incorporate a trick by pointing deep into the library... e.g.

import createUrl from 'tricks/string/createUrl';

const url = createUrl('https://test.com/?name=dodson', {name: 'andrew', extra: 1});

// 'https://test.com/?name=andrew&extra=1'

Helping to keep your projects bundled size to a minimum.

Docs

Whilst the jsdocs are being composed piecemeal ./docs, go explore the directory of functions.

More info and specs in test/ directory.

changelog

2.1.0 (2025-01-17)

Bug Fixes

  • create: handle event listeners (06172ee)
  • queryparse: address comments, noissue (b3cfea5)
  • queryparse: use URLSearchParams, noissue (df3b8bc)

Features

  • new: string/toNumber util (71af8b1)

2.0.2-rc.3 (2024-12-10)

Bug Fixes

  • queryparse: address comments, noissue (b3cfea5)

2.0.2-rc.2 (2024-12-10)

Bug Fixes

  • queryparse: use URLSearchParams, noissue (df3b8bc)

2.0.2-rc.1 (2024-10-01)

Bug Fixes

  • create: handle event listeners (06172ee)

2.0.1 (2024-09-28)

Bug Fixes

2.0.1-rc.1 (2024-09-27)

Bug Fixes

  • bug in events/swipe (8b50d2e)

  • create: handle event listeners (06172ee)

2.0.0 (2023-03-20)

Bug Fixes

  • semver: trigger breaking change (1c6fb3c)

BREAKING CHANGES

  • semver: now using ES Modules

2.0.0-rc.1 (2023-03-20)

Bug Fixes

  • semver: trigger breaking change (1c6fb3c)

BREAKING CHANGES

  • semver: now using ES Modules

1.16.0 (2023-03-20)

Bug Fixes

  • ci: prerelease channel config (0ae0e4b)

Features

1.16.0-rc.1 (2023-03-20)

Bug Fixes

  • ci: prerelease channel config (0ae0e4b)

Features

1.15.1 (2023-02-01)

Bug Fixes

  • doc: fix documentation of extendWithArrayIndex (c294da6)

1.15.0 (2023-02-01)

Features

  • object/extendWithArrayIndex: Add new function (1395867)

1.14.0 (2023-02-01)

Features

  • object/*nestedValues: get/set nested values (5751c5d)

1.13.5 (2021-04-13)

Bug Fixes

  • deps: npm audit localhost (ad1604b)

1.13.4 (2021-03-19)

Bug Fixes

1.13.3 (2021-03-17)

Bug Fixes

1.13.2 (2021-03-17)

Bug Fixes

1.13.1 (2021-02-14)

Bug Fixes

  • extend: prototype pollution (beb1e43)

1.13.0 (2021-02-13)

Features

  • array-partition: add array/partition for breaking an array into separate arrays according to an indexer (9df3510)

1.12.0 (2019-06-26)

Features

  • new: Add string/capitalize (14d89cd)