Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

processor

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

processor

Component object model library

  • 0.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
414
decreased by-28.74%
Maintainers
1
Weekly downloads
 
Created
Source

processor.js Component object model library

processor.js is a platform-independent, JavaScript node.js npm-based library for creating problem-oriented object models, implementation of component-based architecture and application of IoC-patterns. See also controls.js COM library.

NPM version

About the syntax:

// fs.* namespace component module

// Copy files to folder

create('fs.copy', [['libs/jquery.js', 'libs/marked.js', 'libs/bootstrap.js'], 'temp'])
    .updateSync();


// Enumerate files in subdirectories

var list =
    create('fs.walker [f]', [/.*\.utest\.js/i, 'src'])
        .listSync();


// Creating object model

// list source files
root
    .add('source:fs.directory force', 'temp')
        ._add('file1:filereader', 'test1.dat')
        ._add('file2:filereader', 'test2.dat');
// destination file
root
    .add('destination:filewriter', 'temp/out.dat');
// operation
root.add('concat:fs.concat', [root.source.childs, root.destination]);


// events

root.findFirst('filereader')
    .on('watcher', function() {
        alert('oops! test1.dat file changed!');
    });

Approach using OM will allow more flexibility to manage tasks and task parameters. And the possibilities of language, whether it is even and JavaScript, allow you to program components in a simple way, macros and scripts of any complexity.

Installing

npm install processor

install modules

npm install com-fs
...

using

var processor = require('processor'),
    create = processor.create.bind(processor);
// using fs namespace components
    require('com-fs');


// recursively walk and build file list
create('fs.walker raw', [/.*\.js/, '/src'])
    .listSync(function(path) {
        ...
    });
});

modules

GitHub modules list repository

com-fs basic file system components module

FAQs

Package last updated on 14 Feb 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc