JSPM

@httpie/utilities

1.10.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q26301F
  • License MIT

Utility functions for Node.js and JavaScript

Package Exports

  • @httpie/utilities

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@httpie/utilities) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme



utilities

Helper and utility functions for Node.js.


Installation ยท Docs ยท API



Latest Version Monthly downloads

Follow @marcuspoehls and @httpiejs for updates!


Introduction

The @httpie/utilities package provides a handful of useful helper functions for Node.js and JavaScript, like an async tap function.

Installation

npm i @httpie/utilities

Docs

Find all the details for @httpie/utilities in the extensive httpie docs.

API

Using @httpie/utilities is pretty straightforward. The package exports a handful of methods that you can reach for when requiring the package:

tap(value, callback)

Returns the value after running the callback. The callback receives the value as an argument.

const { tap } = require('@httpie/utilities')

return tap(await User.find(1), async (user) => {
  await user.subscribeToNewsletter()
})

// returns the user with ID 1

upon(value, callback)

Returns the result of the callback. The callback receives the value as an argument.

const { upon } = require('@httpie/utilities')

return upon(await User.find(1), async (user) => {
  return user.email
})

// user@email.com

Contributing

Do you miss a goodie function? We very much appreciate your contribution! Please send in a pull request ๐Ÿ˜Š

  1. Create a fork
  2. Create your feature branch: git checkout -b my-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request ๐Ÿš€

License

MIT ยฉ httpie


httpiejs.com  ·  GitHub @httpie  ·  Twitter @httpiejs