
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
sails-hook-organics
Advanced tools
Standard library for Node/Sails applications. Hand-picked and maintained by the Sails.js core team.
Exposes a set of commonly-used functions ("organics") as built-in helpers in your Sails app.
This package contains a set of hand-picked, trusted helpers recommended by the Sails core team, and designed for use as your standard library when building Node/Sails-based applications.
npm install sails-hook-organics --save
var hashedPassword = await sails.helpers.passwords.hashPassword('keyboardcat');
var randomString = sails.helpers.strings.random();
.
├── flow
│ ├── build
│ ├── dive
│ ├── each
│ ├── pause
│ ├── simultaneously
│ └── until
│
├── strings
│ ├── ensureUniq
│ ├── random
│ ├── toStream
│ └── uuid
│
├── http
│ ├── del
│ ├── get
│ ├── patch
│ ├── post
│ ├── put
│ └── sendHttpRequest
│
├── process
│ └── executeCommand
│
├── gravatar
│ └── getAvatarUrl
│
├── mailgun
│ └── sendHtmlEmail
│
├── passwords
│ ├── checkPassword
│ └── hashPassword
│
└── stripe
└── saveBillingInfo
See OTHER-USEFUL-METHODS.md for information on how to use the many additional methods that are no longer included by default.
To report a bug, click here. Someone will look into it ASAP.
In the mean time, if you see how to fix the problem and have a moment to prepare a patch, feel free to submit a pull request to the appropriate repo. Thanks for taking the time to help out!
We always welcome any patch with a bug fix, typo correction, performance enhancement, better error message, or that improves the readability of inline documentation/metadata/comments.
But before submitting modifications to code, please be aware: With this project, we've tried really hard to keep things consistent between individual methods, and that means being vigilant about the effect of any usage change in the grand scheme of the library. Thus we can't merge any unsolicited PRs that contain additive or breaking changes to usage (including new methods or options), without going through the process of submitting a proposal PR to the main Sails repo first. See Contributing below for more information.
Please observe the guidelines and conventions laid out in the Sails project contribution guide when opening issues or submitting pull requests.
First, please check out the relevant documentation. If you are having trouble or have questions, click here!
We refer to the kind of built-in helper provided by this hook as an "organic" helper, in the sense that it is something fundamental and inherent. This hook is also "organic" in the sense that its helpers work kind of like genes-- when you use this hook in an app, you get all of its helpers, even if you're not using some of them right away. Finally, these helpers are also certified "organic" in that they have been hand-checked by the Sails core team to make sure they're solid and up to date. (Because we use them ourselves.)
No, using this hook is completely optional.
The reason sails-hook-organics is extrapolated into a separate package, rather than being baked in to sails
, is so that you can choose not to install it in your app-- i.e. if you don't need or want the functionality it provides, or if you'd prefer to do things differently.
Nevertheless, keep in mind that any particular helper you'd rather not use can always be superceded or overridden by an inline helper in your app. For example, if you need to write your own algorithm for generating unique, pseudorandom string tokens, you might override strings.random()
in your app (api/helpers/strings/random.js
). Or if you want to use Paypal instead of Stripe for billing, you might roll your own, separate saveBillingInfo()
helper (api/helpers/paypal/save-billing-info.js
).
Note: In both customization examples mentioned above, the ideal approach (for interoperability's sake) would be to mimic the existing interface as much as possible (e.g. method names, inputs, & exits). But really, that's icing on the cake. This hook provides supplemental tools designed to make it faster and easier for you to build a stable, maintainable application. It's up to you to build any other custom logic you need for your app-- and it's our job, as your framework, to get out of your way and let you do that.
We'd like to hear it! The best way to share your ideas is to contribute (see below).
We are constantly looking for ways to improve this library. If we're missing something you need from a particular pack, come by to explain your use case and we'll see what we can do. If you're in a hurry, just create a fork or contact us about professional support options.
3rd party dependency versions are pinned, and all releases of this package are carefully considered and tested to adhere to semantic versioning.
The roadmap for this package is flexible and we're open to ideas. The important thing is that we remain relentlessly focused on stability and versatility, while keeping the library relatively lightweight and the usage intuitive. Secondary to that, most of the immediate-term improvements we're interested in making are related to performance.
Awesome! Please have a read through the contribution guide, if you haven't already. If you're actively interested in helping to shape the future usage and roadmap for this library, we welcome your input! Please introduce yourself, let us know a rough guess at the # of hours per week you'll be able to commit, and someone from the core team will contact you ASAP.
This package, like the Sails framework, is free and open-source under the MIT License.
FAQs
Standard library for Node/Sails applications. Hand-picked and maintained by the Sails.js core team.
The npm package sails-hook-organics receives a total of 1,550 weekly downloads. As such, sails-hook-organics popularity was classified as popular.
We found that sails-hook-organics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.