sfacts
Facts for SuperScript engine
Last updated 4 years ago by benhjames .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sfacts 
SYNC missed versions from official npm registry.

Build Status Coverage Status Code Climate

sfacts - Scripted Facts

This library reads in table and topic data into tuples for use in SuperScript. It uses the LevelUp interface alongside MongoDown as a backing store.

sfacts supports ChatScript tables and topics.

Note: Before v1.0.0, sfacts used to write to the filesystem using LevelDB. It now writes to MongoDB, to facilitate scaling of SuperScript.

API

  • clean(dbName, callback)
  • create(dbName, clean, callback)
  • load(dbName, files, clean, callback)

The boolean parameter clean in the create and load methods wipes the existing database if it exists, before creating a new one.

Note: The methods pre-v1.0.0 db and expand are no longer available. The function signatures create and load have changed, and now are required to be called asynchronously (i.e. has a callback parameter).

The return value of create and load is an object:

  • conceptToList(term, [depth,] callback)
  • createUserDB(dbName)
  • createUserDBWithData(dbName, files, callback)
  • db
  • findParentConcepts(term, callback)
  • level
  • loadFiles(files, callback)

Note: The method pre-v1.0.0 loadFile is now named loadFiles. Its behavior is exactly the same.

Current Tags

  • 1.0.0-alpha3                                ...           alpha (4 years ago)
  • 1.0.1                                ...           latest (4 years ago)

17 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 1.0.0-alpha3                                ...           4 years ago
  • 1.0.0-alpha2                                ...           4 years ago
  • 1.0.0-alpha1                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.12                                ...           5 years ago
  • 0.0.10                                ...           5 years ago
  • 0.0.9                                ...           5 years ago
  • 0.0.8                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 20
Dependencies (9)
Dev Dependencies (12)

Copyright 2014 - 2017 © taobao.org |