Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.136.17.154
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
node_modules /
npm /
node_modules /
dot-prop /
Delete
Unzip
Name
Size
Permission
Date
Action
index.js
2.49
KB
-rw-r--r--
2022-01-10 12:20
license
1.09
KB
-rw-r--r--
2022-01-10 12:20
package.json
1.8
KB
-rw-r--r--
2022-01-10 12:20
readme.md
1.81
KB
-rw-r--r--
2022-01-10 12:20
Save
Rename
# dot-prop [](https://travis-ci.org/sindresorhus/dot-prop) > Get, set, or delete a property from a nested object using a dot path ## Install ``` $ npm install --save dot-prop ``` ## Usage ```js const dotProp = require('dot-prop'); // getter dotProp.get({foo: {bar: 'unicorn'}}, 'foo.bar'); //=> 'unicorn' dotProp.get({foo: {bar: 'a'}}, 'foo.notDefined.deep'); //=> undefined dotProp.get({foo: {bar: 'a'}}, 'foo.notDefined.deep', 'default value'); //=> 'default value' dotProp.get({foo: {'dot.dot': 'unicorn'}}, 'foo.dot\\.dot'); //=> 'unicorn' // setter const obj = {foo: {bar: 'a'}}; dotProp.set(obj, 'foo.bar', 'b'); console.log(obj); //=> {foo: {bar: 'b'}} const foo = dotProp.set({}, 'foo.bar', 'c'); console.log(foo); //=> {foo: {bar: 'c'}} dotProp.set(obj, 'foo.baz', 'x'); console.log(obj); //=> {foo: {bar: 'b', baz: 'x'}} // has dotProp.has({foo: {bar: 'unicorn'}}, 'foo.bar'); //=> true // deleter const obj = {foo: {bar: 'a'}}; dotProp.delete(obj, 'foo.bar'); console.log(obj); //=> {foo: {}} obj.foo.bar = {x: 'y', y: 'x'}; dotProp.delete(obj, 'foo.bar.x'); console.log(obj); //=> {foo: {bar: {y: 'x'}}} ``` ## API ### get(obj, path, [defaultValue]) ### set(obj, path, value) Returns the object. ### has(obj, path) ### delete(obj, path) #### obj Type: `Object` Object to get, set, or delete the `path` value. #### path Type: `string` Path of the property in the object, using `.` to separate each nested key. Use `\\.` if you have a `.` in the key. The following path components are invalid and results in `undefined` being returned: `__proto__`, `prototype`, `constructor`. #### value Type: `any` Value to set at `path`. #### defaultValue Type: `any` Default value. ## License MIT © [Sindre Sorhus](https://sindresorhus.com)