Displaying 1 to 20 from 225 results

deep-freeze - recursively Object.freeze() on objects and functions

Call Object.freeze(obj) recursively on all unfrozen properties of obj that are functions or objects.Based in part on the code snippet from the MDN wiki page on Object.freeze(), which is released to the public domain.

superstruct - A simple and composable way to validate data in Javascript.

A simple and composable way to validate data in JavaScript. Superstruct makes it easy to define interfaces and then validate JavaScript data against them. Its type annotation API was inspired by Typescript, Flow, Go, and GraphQL, giving it a familiar and easy to understand API.

Watch.JS - watch the changes of any object or attribute

Watch.JS is a small library with a lot of possibilities. You may know that the "Observer" design pattern involves executing some function when an observed object changes. Other libraries exist that do this, but with Watch.JS you will not have to change the way you develop. Take a look at the examples to see how simple it is to add Watch.JS to your code. If you don't want to call a second watcher in the current scope just set WatchJS.noMore to true and it will be reset to false when this watcher finishes.

just - A library of dependency-free utilities that do just do one thing.

A library of zero-dependency npm modules that do just do one thing. A guilt-free alternative to those bulkier utility libraries. Ideal for mobile web development or wherever bytes are precious. We welcome contributions. Please follow our contribution guidelines.

flat - :steam_locomotive: Flatten/unflatten nested Javascript objects

Take a nested Javascript object and flatten it, or unflatten an object with delimited keys.Use a custom delimiter for (un)flattening your objects, instead of ..

object-assign - ES2015 Object.assign() ponyfill

Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), support Object.assign() 🎉. If you target only those environments, then by all means, use Object.assign() instead of this package.Assigns enumerable own properties of source objects to the target object and returns the target object. Additional source objects will overwrite previous ones.

on-change - Watch an object or array for changes

It works recursively, so it will even detect if you modify a deep property like obj.a.b[0].c = true.Uses the Proxy API.

nodecache - a node internal caching module

A simple caching module that has set, get and delete methods and works a little bit like memcached. Keys can have a timeout (ttl) after which they expire and are deleted from the cache. All keys are stored in a single object so the practical limit is at around 1m keys. Since 4.1.0: Key-validation: The keys can be given as either string or number, but are casted to a string internally anyway. All other types will either throw an error or call the callback with an error.

object-hash - Generate hashes from javascript objects in node and the browser.

Generate hashes from objects and values in node and the browser. Uses node.js crypto module for hashing. Supports SHA1 and many others (depending on the platform) as well as custom streams (e.g. CRC32). Starting with version 1.1.8 (released April 2017), new versions will consider the exact returned hash part of the API contract, i.e. changes that will affect hash values will be considered semver-major. Previous versions may violate that expectation.

icaro - Smart and efficient javascript object observer, ideal for batching DOM updates (~1kb)

icaro is really fast compared to the other reactive libs because it smartly throttles all the state changes. icaro will let you listen to all the changes happening in a javascript object or array, grouping them efficiently, and optimizing the performance of your listeners.

generate-schema - Convert JSON Objects to MySQL Schema, JSON Schema, Mongoose Schema, Google BigQuery, or a Generic template for Swagger files, documentation, code generation, and more

Convert JSON Objects to MySQL Table Schema, JSON Schema, Mongoose Schema, ClickHouse Schema, Google BigQuery, or a Generic template for documentation, code generation, and more. Optionally, add -g to the above if you want the generate-schema command line executable.

object-graph - Provides useful operations on PHP object graphs

Provides useful operations on PHP object graphs. The object_graph_dump() function supports the DOT Graph Description Language (.dot), Portable Document Format (.pdf), Portable Network Graphics (.png), and Scalable Vector Graphics (.svg) output formats.

jsonpath - Query and manipulate JavaScript objects with JSONPath expressions

Query JavaScript objects with JSONPath expressions. Robust / safe JSONPath engine for Node.js. Here are syntax and examples adapted from Stefan Goessner's original post introducing JSONPath in 2007.

Fluent O' Mapper

FluentOMapper (FOM) is a framework to describe an execute mappings from objects tree to others using their properties (getters and setters). It uses lambda expressions to describe mapping, so refactoring is simple. Easy to use either for DTO or complex situations, FOM provid...

scour - Traverse objects and arrays with ease

Calling scour(object) returns a wrapper that you can use to traverse object. Use get() to retrieve values.Use go() to dig into the structure. It will return another scour wrapper scoped to that object.

xtend - extend like a boss

xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.