Socket
Socket
Sign inDemoInstall

amp-utils

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.1.0

2

package.json
{
"name": "amp-utils",
"version": "1.0.4",
"version": "1.1.0",
"description": "A collection of handy utilities.",

@@ -5,0 +5,0 @@ "main": "src/amp.js",

@@ -228,2 +228,11 @@ # amp

## String Utilities
### `amp.string.guid()`
Generate a globally unique identifier (GUID) string. Returns `String`.
#### Examples
```js
amp.string.guid(); // '5aac52a7-d431-aecc-8d35-ef18bf1cbb85'
amp.string.guid(); // 'f2295534-89e3-50cd-18d7-120c62311ac7'
```
### `amp.string.slug(str)`

@@ -230,0 +239,0 @@ Slugify the given string. Returns `String`.

@@ -183,2 +183,11 @@ /**

/**
* Generate random GUID string
* @return {String}
*/
guid() {
const s4 = () => Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
return `${s4()}${s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}`;
},
/**
* Slugify the given string

@@ -185,0 +194,0 @@ * @param {String} str

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc