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

deep-props.get

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-props.get - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

16

CHANGELOG.md
Changelog
=========
<a name="0.1.5"></a>
## [0.1.5](https://github.com/jpcx/deep-props.get/tree/0.1.5) (2018-05-26)
__Since: [deep-props 0.3.0](https://github.com/jpcx/deep-props/blob/master/CHANGELOG.md#0.3.0)__
| __[Changes since 0.1.4](https://github.com/jpcx/deep-props.get/compare/0.1.4...0.1.5)__ | [Release Notes](https://github.com/jpcx/deep-props.get/releases/tag/0.1.5) | [README](https://github.com/jpcx/deep-props.get/tree/0.1.5/README.md) |
| --- | --- | --- |
| [Source Code (zip)](https://github.com/jpcx/deep-props.get/archive/0.1.5.zip) | [Source Code (tar.gz)](https://github.com/jpcx/deep-props.get/archive/0.1.5.tar.gz) |
| --- | --- |
#### Bugfixes
+ __docs:__ Fixed various documentation issues.
<a name="0.1.4"></a>

@@ -80,2 +94,2 @@ ## [0.1.4](https://github.com/jpcx/deep-props.get/tree/0.1.4) (2018-05-12)

#### Features
+ __extract:__ Submodule created.
+ __get:__ Submodule created.

12

index.js
/**
* @author Justin Collier <jpcxme@gmail.com>
* @see {@link http://github.com/jpcx/deep-props|GitHub}
* @see {@link http://github.com/jpcx/deep-props.get|GitHub}
* @license MIT

@@ -31,3 +31,3 @@ */

*
* @typedef {(string|deep-props.get~Container)} deep-props.get~Key
* @typedef {*} deep-props.get~Key
*/

@@ -56,3 +56,3 @@

* <ul>
* <li> For the host <code>{ foo: { bar: 'baz' } }</code> and a path <code>['foo', 'bar']</code>, the Target value will change during the search as follows:
* <li> For the host <code>{ foo: { bar: 'baz' } }</code> and a path <code>['foo', 'bar']</code>, the Target value will change during the operation as follows:
* <ul>

@@ -80,4 +80,4 @@ * <li> <code>{ bar: 'baz' }</code>

* @typedef {function} deep-props.get~GetCustomizer
* @param {deep-props.get~Target} target - Current data being analyzed
* @param {deep-props.get~Key} key - Next key along the path
* @param {deep-props.get~Target} target - Current data being analyzed.
* @param {deep-props.get~Key} key - Key used to extract from target.
* @returns {deep-props.get~Target} Value to pass along to the search function as the next Target. If undefined, will fall back on using standard extraction methods to find the next Target.

@@ -96,3 +96,3 @@ * @example

* @typedef {Object} deep-props.get~Options
* @property {Boolean} [gen] - If true, module returns a generator that yields each search step and returns the final value.
* @property {boolean} [gen] - If true, module returns a generator that yields each search step and ends at the final value.
* @property {deep-props.get~GetCustomizer} [getCustomizer] - Allows for custom extraction.

@@ -99,0 +99,0 @@ * @property {RegExp} [match] - Regular expression used for custom key extraction from supplied path string. If supplied, it is used as the only argument for <code>path.match()</code>, which should return an array of key names.

{
"name": "deep-props.get",
"version": "0.1.4",
"version": "0.1.5",
"description": "Retrieves a nested property from a data source. Supports Objects, Arrays, Maps, Sets, WeakMaps, WeakSets, and JSON. Supports the use of a custom extraction function to handle unsupported datasets.",

@@ -15,2 +15,3 @@ "engines": {

"get",
"getter",
"data",

@@ -26,4 +27,4 @@ "collection",

"json",
"dot",
"bracket",
"dot",
"notation"

@@ -30,0 +31,0 @@ ],

@@ -11,7 +11,7 @@ # [deep-props](https://github.com/jpcx/deep-props/blob/master/README.md).get

The following installation, testing, and deployment instructions assume that deep-props.get will be installed as a standalone module. For instructions on how to install and test all deep-props modules, please [refer to the main README](https://github.com/jpcx/deep-props/blob/master/README.md). Functionality of the module remains the same in both cases.
The following installation, testing, and deployment instructions assume that deep-props.get will be installed as a standalone module. For instructions on how to install and test all deep-props modules, please [refer to the main README](https://github.com/jpcx/deep-props/blob/0.3.0/README.md). Functionality of the module remains the same in both cases.
### Prerequisites
Node.JS version 6.0.0 or above.
Node.JS version 8.7.0 or above.

@@ -26,3 +26,3 @@ ### Installing

The following command will test the package for errors. It prints a large selection of examples to the console; scroll through its output if you want to learn more about the utility.
The following command will test the package for errors. It prints a selection of examples to the console; scroll through its output if you want to learn more about the utility.

@@ -43,3 +43,3 @@ ```console

***Note:*** For string paths using standard settings, '.' is considered the same as '[' and ']'. See [<code>Options</code>](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~Options) for instructions for customizing this behavior.
***Note:*** For string paths using standard settings, '.' is considered the same as '[' and ']'. See [<code>Options</code>](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~Options) for instructions for customizing this behavior.

@@ -100,3 +100,3 @@ **Nested Object Extraction**

// All return 'thud'
// Note: this path must either be an array of strict references or descriptions of insertion order.
// Note: path must either be an array of strict references or descriptions of insertion order.
get(nest, [ keyA, keyB, keyC ])

@@ -182,11 +182,13 @@ get(nest, '0.0.0')

new Map().set(
'bar', new WeakMap().set(
wmKey, JSON.stringify({
baz: [
{
qux: 'quz'
}
]
})
)
'bar', new Set([
new WeakMap().set(
wmKey, JSON.stringify({
baz: [
{
qux: 'quz'
}
]
})
)
])
)

@@ -196,6 +198,7 @@ ]

const wsNest = new WeakSet().add(nest)
// returns 'quz'
// Array path is required here, because wmKey needs to be a reference
get(nest, ['foo', 0, 'bar', wmKey, 'baz', 0, 'qux'])
// Array path containing strict references is required here
get(wsNest, [ nest, 'foo', 0, 'bar', 0, wmKey, 'baz', 0, 'qux' ])
```

@@ -205,3 +208,3 @@

**Usage of a custom extraction function (see [<code>Options</code>](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~Options) and [<code>GetCustomizer</code>](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~GetCustomizer))**
**Usage of a custom extraction function (see [<code>Options</code>](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~Options) and [<code>GetCustomizer</code>](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~GetCustomizer))**
```js

@@ -241,4 +244,4 @@ // Creation of a sample custom data structure which uses a 'retrieve' method for data access.

### See:
+ [API Docs](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/API.md)
+ [Global Docs](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md)
+ [API Docs](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/API.md)
+ [Global Docs](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md)

@@ -253,9 +256,9 @@ ### Module: get

| --- | --- | --- | --- | --- |
| `host` | [deep-props.get~Host](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~Host) | | | Container to search within. |
| `path` | [deep-props.get~Path](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~Path) | | | Path to desired property. |
| `opt` | [deep-props.get~Options](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~Options) | \<optional> | {} | Execution settings. |
| `host` | [deep-props.get~Host](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~Host) | | | Container to search within. |
| `path` | [deep-props.get~Path](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~Path) | | | Path to desired property. |
| `opt` | [deep-props.get~Options](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~Options) | \<optional> | {} | Execution settings. |
Source:
* [deep-props.get/index.js](https://github.com/jpcx/deep-props.get/blob/0.1.4/index.js), [line 282](https://github.com/jpcx/deep-props.get/blob/0.1.4/index.js#L282)
* [deep-props.get/index.js](https://github.com/jpcx/deep-props.get/blob/0.1.5/index.js), [line 282](https://github.com/jpcx/deep-props.get/blob/0.1.5/index.js#L282)

@@ -268,3 +271,3 @@ ##### Returns:

[deep-props.get~Target](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~Target) | [deep-props.get~ResultGenerator](https://github.com/jpcx/deep-props.get/blob/0.1.4/docs/global.md#~ResultGenerator)
[deep-props.get~Target](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~Target) | [deep-props.get~ResultGenerator](https://github.com/jpcx/deep-props.get/blob/0.1.5/docs/global.md#~ResultGenerator)

@@ -275,3 +278,3 @@ #

Versioned using [SemVer](http://semver.org/). For available versions, see the [Changelog](https://github.com/jpcx/deep-props.get/blob/0.1.4/CHANGELOG.md).
Versioned using [SemVer](http://semver.org/). For available versions, see the [Changelog](https://github.com/jpcx/deep-props.get/blob/0.1.5/CHANGELOG.md).

@@ -288,2 +291,2 @@ ## Contribution

This project is licensed under the MIT License - see the [LICENSE](https://github.com/jpcx/deep-props.get/blob/0.1.4/LICENSE) file for details
This project is licensed under the MIT License - see the [LICENSE](https://github.com/jpcx/deep-props.get/blob/0.1.5/LICENSE) file for details

@@ -5,3 +5,3 @@ 'use strict'

* @author Justin Collier <jpcxme@gmail.com>
* @see {@link http://github.com/jpcx/deepget|GitHub}
* @see {@link http://github.com/jpcx/deep-props.get|GitHub}
* @license MIT

@@ -1445,3 +1445,3 @@ */

process.stdout.write('\nResult:\n')
dirDeep(op.result())
dirDeep(result)
if (assertion === true) {

@@ -1448,0 +1448,0 @@ console.log(ANSI_GREEN + '[OK]' + ANSI_RESET)

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