UNPKG

@wider/utils_proto

Version:

A set of extensions to basic objects giving uniform behaviour in various technical environments

31 lines (18 loc) 1.24 kB
# YDR Javascript intrinsic object extenders An ES8+ importable module that may be used stand alone or in conjunction with @wider/utils_bundle Extends the Javascript objects String, Function, Date, Number, and Array with further methods. All method extenders start with the prefix `.wider_` to minimise risk of name clashes as future changes to the primitive objects occur If you do not want to amend the Javascript intrinsic objects then you can create your own substitute classes and extend those instead. ## Documentation [Full Documentation](https://y-d-r.co.uk/packages/@wider/utils_proto/index.html) ## Install ```cmd npm install @wider/utils_proto ``` or you need take no action if any package that has ***@wider/utils_bundle*** as a dependency. ## Activation You must activate the assignment of additional properties to objects before using the object with these methods. This is done automatically if you use and of the ***@wider*** packages that have it as a dependency. To do it manually, call `utils_proto(optionalSettings)` ```Javascript import {utils_proto} from "@wider/utils_proto"; const settings = ifIwantToUseMarkdown ? { "markdown" : true} : null; utils_proto(settings); ```