8000 GitHub - r3wt/object-path: object-path module for deno
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

r3wt/object-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

object-path: get/set object properties using path syntax


this module is written for Deno, but should work in node.js and the browser if compiled to javascript(its written in typescript). There are zero dependencies, except for the tests which are written using the Deno testing library.

install


*Deno allows you to directly import modules from URL's! To import and use the client in your file, add the following import statement:

import { create } from 'https://raw.githubusercontent.com/r3wt/object-path/master/mod.ts';

API


  1. you should use the create function to create a new instance of ObjectPathModule.
const { parse, get, set, configure } = create({
    seperator:'.',//the path seperator to use can be string or RegExp
    defaultUnsetValue: undefined,//the default returned value for not existing properties.
    autoCreate: false // automatically create properties if they don't exist
});// all options are shown and all returned function in the module are shown as well

About

object-path module for deno

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0