
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Get or set a value in an object/array using a dot-delimited string or array of keys.
Get or set a value in an object/array using a dot-delimited string or array of keys.
Returns the value in obj corresponding to path. Returns undefined if path does not exist.
obj — An object or array.path — A dot-delimited string of keys, or an array of keys.var obj = {
foo: {
bar: ['Hello', 'World'],
baz: 'Goodbye'
}
};
jaunt.get(obj, 'foo.bar'); //=> ['Hello', 'World']
jaunt.get(obj, 'foo.baz'); //=> 'Goodbye'
jaunt.get(obj, 'foo.bar.0'); //=> 'Hello'
jaunt.get(obj, 'foo.baz.0'); //=> 'Goodbye'
jaunt.get(obj, ['foo', 'bar', 0]); //=> 'World'
jaunt.get(obj, ['foo', 'baz', 0]); //=> 'Goodbye'
jaunt.get(obj, 'invalid'); //=> undefined
There can be a trailing “0” in path if it corresponds to a leaf node. So, in the example above, the paths foo.baz and foo.baz.0 are equivalent.
Sets the element corresponding to path in the obj to the specified val. Any “intermediate” elements in the path will be created if they do not exist. Returns the modified obj.
obj — An object or array.path — A dot-delimited string of keys, or an array of keys.val — The value to set the element corresponding to path.var obj = {
foo: {
bar: ['Hello', 'World']
}
};
jaunt.set(obj, 'foo.bar.0', 'Hola');
/* =>
* {
* foo: {
* bar: ['Hola', 'World']
* }
* }
*/
jaunt.set(obj, 'baz', 'Shiny!');
/* =>
* {
* foo: {
* bar: ['Hola', 'World']
* },
* baz: 'Shiny!'
* }
*/
Install via npm:
$ npm i --save jaunt
Install via bower:
$ bower i --save yuanqing/jaunt
To use Jaunt in the browser, include the minified script in your HTML:
<body>
<!-- ... -->
<script src="path/to/dist/jaunt.min.js"></script>
<script>
// jaunt available here
</script>
</body>
path for the get methodFAQs
Get or set a value in an object/array using a dot-delimited string or array of keys.
The npm package jaunt receives a total of 511 weekly downloads. As such, jaunt popularity was classified as not popular.
We found that jaunt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.