New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-powertools

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-powertools - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

dist/index.js

9

package.json
{
"name": "node-powertools",
"version": "0.0.10",
"version": "0.0.11",
"description": "Powerful assistive functions for Node and Browser environments.",
"main": "src/index.js",
"main": "dist/index.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha test/ --recursive --timeout=10000"
"test": "./node_modules/mocha/bin/mocha test/ --recursive --timeout=10000",
"prepare": "node ./src/prepare.js"
},

@@ -32,2 +33,2 @@ "engines": {

}
}
}

@@ -28,19 +28,32 @@ <p align="center">

## Install
Install with npm:
## Node Powertools Works in Node AND browser environments
Yes, this module works in both Node and browser environments, including compatibility with [Webpack](https://www.npmjs.com/package/webpack) and [Browserify](https://www.npmjs.com/package/browserify)!
## Features
* Useful **randomization** tools to mix things up
* Helpful **polling** utilities to wait for variables or events
* Powerful **regexify** and **escape** functions to go work with `RegExp`
## Install Node Powertools
### Install via npm
Install with npm if you plan to use **Node Powertools** in a Node.js project or in the browser.
```shell
npm install node-powertools
```
If you plan to use `node-powertools` in a browser environment, you will probably need to use [Webpack](https://www.npmjs.com/package/webpack), [Browserify](https://www.npmjs.com/package/browserify), or a similar service to compile it.
## Features
* Useful **randomization** tools
* Helpful **polling** utilities
## Example Setup
After installing via npm, simply `require` the library and begin enjoying the powertools 🧰.
```js
// In your functions/index.js file
const powertools = require('node-powertools');
```
### Install via CDN
Install with CDN if you plan to use **Node Powertools** only in a browser environment.
```html
<script src="https://cdn.jsdelivr.net/npm/node-powertools@latest/dist/index.min.js"></script>
<script type="text/javascript">
var powertools = Powertools(); // The script above exposes the global variable 'Powertools'
</script>
```
## Usage

@@ -47,0 +60,0 @@ ### powertools.random(min, max, options)

@@ -116,3 +116,3 @@ (function (root, factory) {

var flags = regex.replace(/.*\/([gimy]*)$/, '$1');
var pattern = regex.replace(new RegExp(`^/(.*?)/${flags}$`), '$1');
var pattern = regex.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
return new RegExp(pattern, flags);

@@ -219,3 +219,3 @@ }

} else if (!Array.isArray(result)) {
result = typeof result === 'string' ? result : `${result}`;
result = typeof result === 'string' ? result : (result + '');
result = result.split(',');

@@ -222,0 +222,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc